Skip to content

Commit

Permalink
Mojang download access denied with CURL
Browse files Browse the repository at this point in the history
Added user-agent and header to get through Mojang ACL for download page
  • Loading branch information
aessing authored Jul 17, 2021
1 parent 1b85e1f commit a069d03
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ RUN apt-get update -y \
&& mkdir -p ${SERVER_PATH} \
&& mkdir -p ${CONFIG_PATH} \
&& mkdir -p ${DATA_PATH} \
&& curl $(curl ${DOWNLOAD_URL} | grep -Eoi '<a [^>]+>' | grep -i bin-linux | grep -Eo 'href="[^\"]+"' | grep -Eo '(http|https)://[a-zA-Z0-9./?=_%:-]*') --output ${SERVER_PATH}.zip \
&& curl $(curl --user-agent "aessing/minecraft-bedrock-container" --header "accept-language:*" "${DOWNLOAD_URL}" | grep -Eoi '<a [^>]+>' | grep -i bin-linux | grep -Eo 'href="[^\"]+"' | grep -Eo '(http|https)://[a-zA-Z0-9./?=_%:-]*') --output ${SERVER_PATH}.zip \
&& unzip ${SERVER_PATH}.zip -d ${SERVER_PATH} \
&& chmod 755 ${SERVER_PATH}/bedrock_server \
&& rm ${SERVER_PATH}.zip
Expand Down

0 comments on commit a069d03

Please sign in to comment.