diff --git a/Dockerfile b/Dockerfile index de662ba..2fd2a2b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,6 @@ FROM debian +# ARCH is only set to avoid repetition in Dockerfile since the binary download only supports amd64 ARG ARCH=amd64 RUN apt-get update && \ @@ -17,16 +18,15 @@ WORKDIR /data ENTRYPOINT ["/usr/local/bin/entrypoint-demoter", "--match", "/data", "--debug", "--stdin-on-term", "stop", "/opt/bedrock-entry.sh"] -ARG EASY_ADD_VERSION=0.5.0 -ADD https://github.com/itzg/easy-add/releases/download/${EASY_ADD_VERSION}/easy-add_${EASY_ADD_VERSION}_linux_${ARCH} /usr/local/bin/easy-add +ARG EASY_ADD_VERSION=0.7.0 +ADD https://github.com/itzg/easy-add/releases/download/${EASY_ADD_VERSION}/easy-add_linux_${ARCH} /usr/local/bin/easy-add RUN chmod +x /usr/local/bin/easy-add -RUN easy-add --var version=0.2.1 --var app=entrypoint-demoter --file entrypoint-demoter --from https://github.com/itzg/{{.app}}/releases/download/{{.version}}/{{.app}}_{{.version}}_Linux_{{.arch}}.tar.gz +RUN easy-add --var version=0.2.1 --var app=entrypoint-demoter --file {{.app}} --from https://github.com/itzg/{{.app}}/releases/download/{{.version}}/{{.app}}_{{.version}}_linux_${ARCH}.tar.gz -RUN easy-add --var version=0.1.1 --var app=set-property --file set-property --from https://github.com/itzg/{{.app}}/releases/download/{{.version}}/{{.app}}_{{.version}}_{{.os}}_{{.arch}}.tar.gz +RUN easy-add --var version=0.1.1 --var app=set-property --file {{.app}} --from https://github.com/itzg/{{.app}}/releases/download/{{.version}}/{{.app}}_{{.version}}_linux_${ARCH}.tar.gz -ARG RESTIFY_VERSION=1.2.0 -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 version=1.2.0 --var app=restify --file {{.app}} --from https://github.com/itzg/{{.app}}/releases/download/{{.version}}/{{.app}}_{{.version}}_linux_${ARCH}.tar.gz COPY *.sh /opt/ diff --git a/bedrock-entry.sh b/bedrock-entry.sh index cea3b41..32e9ad0 100755 --- a/bedrock-entry.sh +++ b/bedrock-entry.sh @@ -1,5 +1,7 @@ #!/bin/bash +downloadPage=https://www.minecraft.net/en-us/download/server/bedrock/ + if [[ ${EULA^^} != TRUE ]]; then echo echo "EULA must be set to TRUE to indicate agreement with the Minecraft End User License" @@ -27,7 +29,7 @@ case ${VERSION} in ;; *) for a in data-bi-prtid data-platform; do - DOWNLOAD_URL=$(restify --attribute=${a}=serverBedrockLinux https://www.minecraft.net/en-us/download/server/bedrock/ 2> /dev/null | jq -r '.[0].href' || echo '') + DOWNLOAD_URL=$(restify --attribute=${a}=serverBedrockLinux ${downloadPage} 2> /tmp/restify.out | jq -r '.[0].href' || echo '') if [[ ${DOWNLOAD_URL} ]]; then break fi @@ -35,7 +37,8 @@ case ${VERSION} in if [[ ${DOWNLOAD_URL} =~ http.*/.*-(.*)\.zip ]]; then VERSION=${BASH_REMATCH[1]} else - echo "Failed to process download URL ${DOWNLOAD_URL}" + echo "Failed to extract download URL '${DOWNLOAD_URL}' from ${downloadPage}" + cat /tmp/restify.out exit 2 fi ;;