Added diagnostic output when restify fails all attribute types
This commit is contained in:
1 parent
5e1f00e044
commit
5c484f1b3e
2 files changed
+11
-8
No files matched your search
+6
-6
@@ -1,5 +1,6 @@
|
|||||||
FROM debian
|
FROM debian
|
||||||
|
|
||||||
|
# ARCH is only set to avoid repetition in Dockerfile since the binary download only supports amd64
|
||||||
ARG ARCH=amd64
|
ARG ARCH=amd64
|
||||||
|
|
||||||
RUN apt-get update && \
|
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"]
|
ENTRYPOINT ["/usr/local/bin/entrypoint-demoter", "--match", "/data", "--debug", "--stdin-on-term", "stop", "/opt/bedrock-entry.sh"]
|
||||||
|
|
||||||
ARG EASY_ADD_VERSION=0.5.0
|
ARG EASY_ADD_VERSION=0.7.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
|
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 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 {{.app}} --from https://github.com/itzg/{{.app}}/releases/download/{{.version}}/{{.app}}_{{.version}}_linux_${ARCH}.tar.gz
|
||||||
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
|
|
||||||
|
|
||||||
COPY *.sh /opt/
|
COPY *.sh /opt/
|
||||||
|
|
||||||
|
|||||||
+5
-2
@@ -1,5 +1,7 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
|
downloadPage=https://www.minecraft.net/en-us/download/server/bedrock/
|
||||||
|
|
||||||
if [[ ${EULA^^} != TRUE ]]; then
|
if [[ ${EULA^^} != TRUE ]]; then
|
||||||
echo
|
echo
|
||||||
echo "EULA must be set to TRUE to indicate agreement with the Minecraft End User License"
|
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
|
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
|
if [[ ${DOWNLOAD_URL} ]]; then
|
||||||
break
|
break
|
||||||
fi
|
fi
|
||||||
@@ -35,7 +37,8 @@ case ${VERSION} in
|
|||||||
if [[ ${DOWNLOAD_URL} =~ http.*/.*-(.*)\.zip ]]; then
|
if [[ ${DOWNLOAD_URL} =~ http.*/.*-(.*)\.zip ]]; then
|
||||||
VERSION=${BASH_REMATCH[1]}
|
VERSION=${BASH_REMATCH[1]}
|
||||||
else
|
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
|
exit 2
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
|
|||||||
Reference in new issue
Block a user