change Docker environment fedora version keep latest and Improve docker tutorial #3

Closed
zaphkito wants to merge 4 commits from (deleted):master into master
2 changed files with 25 additions and 23 deletions

View File

@ -1,4 +1,4 @@
FROM fedora:36
FROM fedora:latest
LABEL description="Build environment for segatools"

View File

@ -81,14 +81,33 @@ The output will be located in `build/zip`.
### Build and create distribution package using docker
You can also build using docker which avoids having to setup a full development environment if you
are just interested in building binaries of the latest changes. Naturally, this requires you to
have the docker daemon installed.
are just interested in building binaries of the latest changes.
This will also work on WSL2
If you don't have installed docker,you can run these commands
```shell
make build-docker
curl -fsSL https://get.docker.com -o get-docker.sh
sh get-docker.sh
```
Once completed successfully, the build output is located in the `build/docker/zip` sub-folder.
When it install finished,we can build segatools in docker
```shell
git clone <segatools Repo> <folder>
cd /path/to/segatools
docker build -t segatools-build .
docker run -v /path/to/segatools:/segatools segatools-build
```
Once completed successfully, the build output will be located in `build/build32` `build/build64` and `build/zip` folders in your real folder
Now you can delete your build image when you build complete,this will not affect your files
```shell
docker rmi -f segatools-build
```
### Building with Docker Desktop on Windows
@ -97,21 +116,4 @@ Once completed successfully, the build output is located in the `build/docker/zi
* Run Docker Desktop to start the Docker Engine
* Open a command prompt (`cmd.exe`) and `cd` to your `segatools` folder
* Run `docker-build.bat`
* Once completed successfully, build output is located in the `build/docker/zip` sub-folder.
### Building with Docker on Windows using WSL2
* [Install WSL2](https://docs.microsoft.com/en-us/windows/wsl/install-win10)
* Regarding Linux distribution, we recommend using Ubuntu 20.04
* Run the "Ubuntu 20.04 LTS" App which opens a Linux shell
* Install `make` and `docker` by running
* `sudo apt-get update`
* `sudo apt-get install make docker.io`
* Add the current user to the docker group that you don't have to run docker commands with root:
`sudo usermod -a -G docker $USER`
* Run the docker daemon in the background: `sudo dockerd > /dev/null 2>&1 &`
* Navigate to your segatools folder. If it is located on the `C:` drive, WSL automatically provides
a mountpoint for that under `/mnt/c`, e.g. `cd /mnt/c/segatools` (if the folder `segatools` is
located under `C:\segatools` on Windows).
* Build segatools: `make build-docker`
* Once completed successfully, build output is located in the `build/docker/zip` sub-folder
* Once completed successfully, build output is located in the `build/docker/zip` sub-folder.