2020-05-22 01:48:54 +00:00
|
|
|
|
2023-06-13 12:59:03 +00:00
|
|
|
## Building image locally with alternate Java base
|
|
|
|
|
|
|
|
The following shows how to change the base Java image used by the build:
|
|
|
|
|
|
|
|
```shell
|
2023-06-15 03:28:22 +00:00
|
|
|
docker build --build-arg BASE_IMAGE=ghcr.io/graalvm/graalvm-ce:ol8-java11 -t IMG_PREFIX/minecraft-server:java11-graalvm .
|
2023-06-13 12:59:03 +00:00
|
|
|
```
|
|
|
|
|
|
|
|
## Building a multi-architecture image
|
|
|
|
|
|
|
|
Ensure buildx/BuildKit support is enabled and run the following to build multi-architecture and push to the repository as named by the image:
|
|
|
|
|
|
|
|
```shell
|
|
|
|
docker buildx build --platform=linux/arm64 --platform=linux/arm/v7 --platform=linux/amd64 --tag IMG_PREFIX/minecraft-server --push .
|
|
|
|
```
|
|
|
|
|
|
|
|
To build for local images, multi-architecture is not supported, use the following with buildx to load the image into the local daemon:
|
|
|
|
|
|
|
|
```shell
|
|
|
|
docker buildx build --tag IMG_PREFIX/minecraft-server --load .
|
2020-05-22 01:48:54 +00:00
|
|
|
```
|
2020-07-26 18:51:16 +00:00
|
|
|
|
2023-06-13 12:59:03 +00:00
|
|
|
or just a plain build
|
2020-07-26 18:51:16 +00:00
|
|
|
|
2023-06-13 12:59:03 +00:00
|
|
|
```shell
|
|
|
|
docker build -t IMG_PREFIX/minecraft-server .
|
2020-07-26 18:51:16 +00:00
|
|
|
```
|