mirror of
https://github.com/itzg/docker-minecraft-server.git
synced 2024-06-07 19:40:43 +00:00
docs: fixed building page formatting and added base image info (#2210)
This commit is contained in:
parent
61bc034589
commit
24f40c84ee
@ -1,11 +1,28 @@
|
||||
Ensure buildx/BuildKit support is enabled and run:
|
||||
|
||||
```shell script
|
||||
docker buildx build --platform=linux/arm64 --platform=linux/arm/v7 --platform=linux/amd64 --tag itzg/minecraft-server:multiarch --push .
|
||||
## Building image locally with alternate Java base
|
||||
|
||||
The following shows how to change the base Java image used by the build:
|
||||
|
||||
```shell
|
||||
docker build --build-arg BASE_IMG=ghcr.io/graalvm/graalvm-ce:ol8-java11 -t IMG_PREFIX/minecraft-server:java11-graalvm .
|
||||
```
|
||||
|
||||
To build for local testing, use:
|
||||
## Building a multi-architecture image
|
||||
|
||||
```shell script
|
||||
docker buildx build --platform=linux/amd64 --tag mc-multiarch --load .
|
||||
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 .
|
||||
```
|
||||
|
||||
or just a plain build
|
||||
|
||||
```shell
|
||||
docker build -t IMG_PREFIX/minecraft-server .
|
||||
```
|
||||
|
Loading…
Reference in New Issue
Block a user