Skip to content

Commit 8b9e2e2

Browse files
committed
minor reformatting
1 parent 12e4eb9 commit 8b9e2e2

File tree

1 file changed

+13
-12
lines changed

1 file changed

+13
-12
lines changed

guides/server-guide/linux-setup/build-docker-image.md

+13-12
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Build Multi-Architecture Docker Server Image
1+
# Build Docker server image
22

33
**This is an advanced guide. If you have not worked with `docker` before, it is best that you [follow the Docker setup guide](docker-setup.md) to pull the official docker image from the tiltedphoques repository on Docker Hub.**
44

@@ -8,15 +8,15 @@ In order to follow these instructions, you will need to have an account on [Dock
88

99
Below, we will be referring to your docker hub repository as `username/image_name` when we push images. Please note that anywhere you see `username` it needs to be your Docker Hub username.
1010

11-
## Setting up Docker Multiarch Builder with Buildx
11+
## Gathering Requirements for Building Server Container
1212

1313
We only need `Dockerfile` and `Dockerfile.builder` in order to build the image. We have three options to retrieve these files, you only need to choose and follow the steps in one of them.
1414

1515
#### Option 1: Clone the TiltedEvolution Repository
1616

1717
This is the writer's preference, since it will always pull the latest Dockerfile and Dockerfile.builder, and it's simple. It does download the full repo, however, which includes files unecessary for this process.
1818

19-
1. Run the following command to clone the repository into `~/str`:\
19+
1. Run the following command to clone the repository into ~/str:\
2020
`git clone https://github.com/tiltedphoques/TiltedEvolution.git ~/str`
2121
* We will not be building this project directly so we do not require the submodules/dependencies.
2222
* If you encounter an error about login status, install gh `sudo apt install gh` and login `gh auth login` to your github account.
@@ -44,7 +44,7 @@ This option does not download any unecessary files, though it is a few more comm
4444
`touch Dockerfile Dockerfile.builder`
4545
3. Open Dockerfile for editing:\
4646
`nano Dockerfile`
47-
4. Copy the following contents into Dockerfile and save:\
47+
4. Copy the following contents into Dockerfile and save:
4848
```
4949
FROM username/multiarch-builder:latest as builder
5050
@@ -91,9 +91,9 @@ ENTRYPOINT ["./SkyrimTogetherServer"]
9191
9292
EXPOSE 10578/udp
9393
```
94-
6. Open Dockerfile.builder for editing:\
94+
* Open Dockerfile.builder for editing:\
9595
`nano Dockerfile.builder`
96-
7. Copy the following contents into Dockerfile.builder and save:\
96+
* Copy the following contents into Dockerfile.builder and save:
9797
```
9898
FROM ubuntu:22.04
9999
@@ -119,24 +119,25 @@ RUN apt update && apt install \
119119
```
120120

121121

122-
### Step 1 - Building the Multiarch Builder with Buildx
122+
## Building the Multiarch Builder with Buildx
123+
124+
This builder image is based off of Ubuntu 22.04 and installs the necessary requirements to build the server docker image later. This step is only required once, since any time you build the server image afterwards your multiarch-builder image can be pulled from Docker Hub.
123125

124126
1. First we are going to set up the multi-architecture builder with `docker buildx`:\
125127
`docker buildx create --name str-multiarch --use`
126128
2. And verify that it is loaded:\
127129
`docker buildx inspect --bootstrap`
128130
3. For some reason, buildx can occasionally have a bug where it won't build emulated architectures, but we can get around that with the command:\
129131
`docker run --rm --privileged multiarch/qemu-user-static --reset -p yes`
130-
4. Now we will create the multi-architecture builder for both `linux/amd64` and `linux/arm64` architectures. This will create the builder image for use on PCs with AMD/Intel CPU and also for RaspberryPi/equivalent running x64 Linux:\
132+
4. Now we will create the multi-architecture builder for both linux/amd64 and linux/arm64 architectures. This will create the builder image for use on PCs with AMD/Intel CPU and also for RaspberryPi/equivalent running x64 Linux:\
131133
`docker buildx build --platform linux/amd64,linux/arm64 -f Dockerfile.builder -t username/multiarch-builder:latest --push .`
132134

133-
This builder image is based off of Ubuntu 22.04 and installs the necessary requirements to build the server docker image later. This step is only required once, since any time you build the server image afterwards your multiarch-builder image can be pulled from Docker Hub.
134-
135135

136+
## Building the Multiarch Server Container with Buildx
136137

137-
### Step 2 - Building the Multiarch Server Container with Buildx
138+
Everything above this header need only be done once. This step is where we actually build the server image, and should be done any time you wish to update your server image.
138139

139-
1. Since you're following these instructions, I assume you want to pull the `multiarch-builder` we just built from your Docker Hub repository. If that is the case, edit the first line of `Dockerfile` to read:\
140+
1. Since you're following these instructions, I assume you want to pull the multiarch-builder we just built from your Docker Hub repository. If that is the case, edit the first line of Dockerfile to read:\
140141
`FROM username/multiarch-builder:latest as builder`
141142
2. Now we'll use our multiarch-builder to create the server docker container:\
142143
`docker buildx build --platform linux/amd64,linux/arm64 -f Dockerfile -t username/st-reborn-server:latest --push .`

0 commit comments

Comments
 (0)