Merge branch 'no-curl' into 'master'

build for arm, arm64, and amd64

See merge request CorySanin/clone-hero-server-docker!3
This commit is contained in:
Cory Sanin committed 2020-08-06 21:31:36 +00:00
commit af707e46cd
2 files changed
+10 -5

No files matched your search

+6 -3
View File
@@ -16,8 +16,11 @@ build:
- "update-binfmts --enable"
- apt-get update; apt-get install --no-install-recommends -y ca-certificates jq
- "VERSION=$(curl -s \"https://dl$BRANCH.b-cdn.net/linux-index.json\" | jq -r .[0].version | sed \"s/v0/v/\")"
- if [ "$BRANCH" == "test" ]; then VERSION="$BRANCH-$VERSION"; fi
- TAG=$VERSION
- if [ "$BRANCH" == "test" ]; then TAG="$BRANCH-$VERSION"; fi
script:
- "docker buildx build --platform linux/arm64/v8,linux/amd64 --build-arg \"BRANCH=$BRANCH\" -t \"corysanin/clone-hero-server:latest\" ."
- "docker buildx build --platform linux/amd64 --build-arg \"BRANCH=$BRANCH\" --build-arg \"VERSION=$VERSION\" -t \"corysanin/clone-hero-server:latest\" ."
- "docker buildx build --platform linux/arm64/v8 --build-arg \"BRANCH=$BRANCH\" --build-arg \"VERSION=$VERSION\" -t \"corysanin/clone-hero-server:latest\" ."
- "docker buildx build --platform linux/arm/v7 --build-arg \"BRANCH=$BRANCH\" --build-arg \"VERSION=$VERSION\" -t \"corysanin/clone-hero-server:latest\" ."
- docker create --name=chs corysanin/clone-hero-server:latest
- "if [ ! -z ${DOCKER_PASSWORD+x} ]; then echo \"$DOCKER_PASSWORD\" | docker login -u \"$DOCKER_USERNAME\" --password-stdin; docker buildx build --push --platform linux/arm64/v8,linux/amd64 --build-arg \"BRANCH=$BRANCH\" -t \"corysanin/clone-hero-server:latest\" .; docker buildx build --push --platform linux/arm64/v8,linux/amd64 --build-arg \"BRANCH=$BRANCH\" -t \"corysanin/clone-hero-server:$VERSION\" .; fi"
- "if [ ! -z ${DOCKER_PASSWORD+x} ]; then echo \"$DOCKER_PASSWORD\" | docker login -u \"$DOCKER_USERNAME\" --password-stdin; docker buildx build --push --platform linux/arm/v7,linux/arm64/v8,linux/amd64 --build-arg \"BRANCH=$BRANCH\" --build-arg \"VERSION=$VERSION\" -t \"corysanin/clone-hero-server:latest\" .; docker buildx build --push --platform linux/arm/v7,linux/arm64/v8,linux/amd64 --build-arg \"BRANCH=$BRANCH\" --build-arg \"VERSION=$VERSION\" -t \"corysanin/clone-hero-server:$TAG\" .; fi"
+4 -2
View File
@@ -6,13 +6,15 @@ RUN apt-get update \
WORKDIR /clonehero
ARG BRANCH=test
RUN chversion=$(curl -s "https://dl$BRANCH.b-cdn.net/linux-index.json" | jq -r .[0].version | sed "s/v0/v/") \
&& wget -O chserver.zip https://dl.clonehero.net/chserver/ChStandaloneServer-$chversion.zip \
ARG VERSION
RUN if [ -z ${VERSION+x} ]; then VERSION=$(curl -s "https://dl$BRANCH.b-cdn.net/linux-index.json" | jq -r .[0].version | sed "s/v0/v/"); fi \
&& wget -O chserver.zip https://dl.clonehero.net/chserver/ChStandaloneServer-$VERSION.zip \
&& unzip chserver.zip \
&& rm ./chserver.zip \
&& mv ./ChStandaloneServer-* ./chserver \
&& mv ./chserver/linux-x64 ./chserver/linux-x86_64 \
&& mv ./chserver/linux-arm64 ./chserver/linux-aarch64 \
&& mv ./chserver/linux-arm ./chserver/linux-armv7l \
&& mv ./chserver/linux-$(arch)/* . \
&& rm -rf ./chserver \
&& chmod +x ./Server \