You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: guides/server-guide/linux-setup/build-docker-image.md
+13-12
Original file line number
Diff line number
Diff line change
@@ -1,4 +1,4 @@
1
-
# Build Multi-Architecture Docker Server Image
1
+
# Build Docker server image
2
2
3
3
**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.**
4
4
@@ -8,15 +8,15 @@ In order to follow these instructions, you will need to have an account on [Dock
8
8
9
9
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.
10
10
11
-
## Setting up Docker Multiarch Builder with Buildx
11
+
## Gathering Requirements for Building Server Container
12
12
13
13
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.
14
14
15
15
#### Option 1: Clone the TiltedEvolution Repository
16
16
17
17
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.
18
18
19
-
1. Run the following command to clone the repository into `~/str`:\
19
+
1. Run the following command to clone the repository into ~/str:\
### 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.
123
125
124
126
1. First we are going to set up the multi-architecture builder with `docker buildx`:\
125
127
`docker buildx create --name str-multiarch --use`
126
128
2. And verify that it is loaded:\
127
129
`docker buildx inspect --bootstrap`
128
130
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:\
129
131
`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:\
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
-
135
135
136
+
## Building the Multiarch Server Container with Buildx
136
137
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.
138
139
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:\
140
141
`FROM username/multiarch-builder:latest as builder`
141
142
2. Now we'll use our multiarch-builder to create the server docker container:\
0 commit comments