mirror of
https://github.com/itzg/docker-minecraft-server.git
synced 2024-06-07 19:40:43 +00:00
Try BuildKit/multiarch support on CircleCI
This commit is contained in:
parent
a24b633ccb
commit
690598da60
@ -1,17 +1,15 @@
|
||||
version: 2
|
||||
jobs:
|
||||
minecraft_server:
|
||||
docker:
|
||||
- image: circleci/buildpack-deps:19.10
|
||||
steps:
|
||||
- checkout
|
||||
- setup_remote_docker
|
||||
- run:
|
||||
name: Build image
|
||||
command: docker build -t mc:$CIRCLE_BUILD_NUM .
|
||||
version: 2.1
|
||||
|
||||
orbs:
|
||||
docker: circleci/docker@0.5.20
|
||||
|
||||
workflows:
|
||||
version: 2
|
||||
build:
|
||||
jobs:
|
||||
- minecraft_server
|
||||
- docker/publish:
|
||||
image: $CIRCLE_PROJECT_USERNAME/minecraft-server
|
||||
tag: multiarch
|
||||
extra_build_args: "--platform linux/amd64,linux/arm64,linux/arm/v7"
|
||||
deploy: false
|
||||
|
||||
|
32
Dockerfile
32
Dockerfile
@ -26,23 +26,35 @@ RUN addgroup -g 1000 minecraft \
|
||||
|
||||
EXPOSE 25565 25575
|
||||
|
||||
# hook into docker buildx --platform support
|
||||
# see https://github.com/docker/buildx/#---platformvaluevalue
|
||||
ARG TARGETPLATFORM=linux/amd64
|
||||
# hook into docker BuildKit --platform support
|
||||
# see https://docs.docker.com/engine/reference/builder/#automatic-platform-args-in-the-global-scope
|
||||
ARG TARGETOS
|
||||
ARG TARGETARCH
|
||||
ARG TARGETVARIANT
|
||||
|
||||
ARG EASY_ADD_VER=0.5.1
|
||||
ADD "https://easy-add-downloader.now.sh/api/download?version=${EASY_ADD_VER}&platform=${TARGETPLATFORM}" /usr/bin/easy-add
|
||||
ARG EASY_ADD_VER=0.5.3
|
||||
ADD https://github.com/itzg/easy-add/releases/download/${EASY_ADD_VER}/easy-add_${TARGETOS}_${TARGETARCH}${TARGETVARIANT} /usr/bin/easy-add
|
||||
RUN chmod +x /usr/bin/easy-add
|
||||
|
||||
RUN easy-add --var version=1.2.0 --var app=restify --file restify --from https://github.com/itzg/{{.app}}/releases/download/{{.version}}/{{.app}}_{{.version}}_{{.os}}_{{.arch}}.tar.gz
|
||||
RUN easy-add --var os=${TARGETOS} --var arch=${TARGETARCH}${TARGETVARIANT} \
|
||||
--var version=1.2.0 --var app=restify --file restify \
|
||||
--from https://github.com/itzg/{{.app}}/releases/download/{{.version}}/{{.app}}_{{.version}}_{{.os}}_{{.arch}}.tar.gz
|
||||
|
||||
RUN easy-add --var version=1.4.7 --var app=rcon-cli --file rcon-cli --from https://github.com/itzg/{{.app}}/releases/download/{{.version}}/{{.app}}_{{.version}}_{{.os}}_{{.arch}}.tar.gz
|
||||
RUN easy-add --var os=${TARGETOS} --var arch=${TARGETARCH}${TARGETVARIANT} \
|
||||
--var version=1.4.7 --var app=rcon-cli--file rcon-cli \
|
||||
--from https://github.com/itzg/{{.app}}/releases/download/{{.version}}/{{.app}}_{{.version}}_{{.os}}_{{.arch}}.tar.gz
|
||||
|
||||
RUN easy-add --var version=0.1.6 --var app=mc-monitor --file mc-monitor --from https://github.com/itzg/{{.app}}/releases/download/v{{.version}}/{{.app}}_{{.version}}_Linux_{{.arch}}.tar.gz
|
||||
RUN easy-add --var os=${TARGETOS} --var arch=${TARGETARCH}${TARGETVARIANT} \
|
||||
--var version=0.1.6 --var app=mc-monitor --file mc-monitor \
|
||||
--from https://github.com/itzg/{{.app}}/releases/download/v{{.version}}/{{.app}}_{{.version}}_Linux_{{.arch}}.tar.gz
|
||||
|
||||
RUN easy-add --var version=1.3.3 --var app=mc-server-runner --file mc-server-runner --from https://github.com/itzg/{{.app}}/releases/download/{{.version}}/{{.app}}_{{.version}}_{{.os}}_{{.arch}}.tar.gz
|
||||
RUN easy-add --var os=${TARGETOS} --var arch=${TARGETARCH}${TARGETVARIANT} \
|
||||
--var version=1.3.3 --var app=mc-server-runner --file mc-server-runner \
|
||||
--from https://github.com/itzg/{{.app}}/releases/download/{{.version}}/{{.app}}_{{.version}}_{{.os}}_{{.arch}}.tar.gz
|
||||
|
||||
RUN easy-add --var version=0.1.0 --var app=maven-metadata-release --file maven-metadata-release --from https://github.com/itzg/{{.app}}/releases/download/v{{.version}}/{{.app}}_{{.version}}_{{.os}}_{{.arch}}.tar.gz
|
||||
RUN easy-add --var os=${TARGETOS} --var arch=${TARGETARCH}${TARGETVARIANT} \
|
||||
--var version=0.1.0 --var app=maven-metadata-release--file maven-metadata-release \
|
||||
--from https://github.com/itzg/{{.app}}/releases/download/v{{.version}}/{{.app}}_{{.version}}_{{.os}}_{{.arch}}.tar.gz
|
||||
|
||||
COPY mcadmin.jq /usr/share
|
||||
COPY mcstatus /usr/local/bin
|
||||
|
Loading…
Reference in New Issue
Block a user