Skip to content

Commit 4c76926

Browse files
committed
- Temporary solution for required login to download java
- Use of version_manifest.json to retreive download jar url
1 parent 361c021 commit 4c76926

File tree

4 files changed

+11
-12
lines changed

4 files changed

+11
-12
lines changed

Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ RUN \
5454
# copy setup, default parameters and init files
5555
COPY service /container/service
5656
COPY defaults /defaults
57+
COPY external_packages /opt
5758

5859
# set permissions and run install-service script
5960
RUN \
83.8 MB
Binary file not shown.

service/minecraft/deploy/deploy.sh

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,11 @@ function installJAVA {
1515
# Download and install latest jre 8 (Java)
1616
echo "**** Install JAVA JRE 8 ****"
1717
cd /opt
18-
wget --no-cookies --no-check-certificate --header "Cookie: oraclelicense=accept-securebackup-cookie" https://download.oracle.com/otn-pub/java/jdk/8u201-b09/42970487e3af4f5aa5bca3f542482c60/jre-8u201-linux-x64.tar.gz
19-
tar -zxvf jre-8u201-linux-x64.tar.gz
20-
update-alternatives --install /usr/bin/java java /opt/jre1.8.0_201/bin/java 1
18+
# wget --no-cookies --no-check-certificate --header "Cookie: oraclelicense=accept-securebackup-cookie" https://download.oracle.com/otn/java/jdk/8u211-b12/478a62b7d4e34b78b671c754eaaf38ab/jre-8u211-linux-x64.tar.gz
19+
tar -zxvf jre-8u211-linux-x64.tar.gz
20+
update-alternatives --install /usr/bin/java java /opt/jre1.8.0_211/bin/java 1
2121
echo "**** cleanup ****"
22-
rm jre-8u201-linux-x64.tar.gz
22+
rm jre-8u211-linux-x64.tar.gz
2323
}
2424

2525

@@ -102,6 +102,7 @@ case "$TYPE" in
102102
/var/lib/apt/lists/* \
103103
/tmp/* \
104104
/var/tmp/*
105+
rm /opt/jre-8u211-linux-x64.tar.gz
105106
exec /sbin/setuser docker /container/service/minecraft/deploy/deploy_POCKETMINE.sh
106107
;;
107108

service/minecraft/deploy/deploy_VANILLA.sh

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,12 @@
44
## CONSTANTS ##
55
###############
66
export SERVER="minecraft_server.$VANILLA_VERSION.jar"
7-
case "$VANILLA_VERSION" in
8-
1.13)
9-
MINECRAFT_DOWNLOAD="https://launcher.mojang.com/mc/game/1.13/server/d0caafb8438ebd206f99930cfaecfa6c9a13dca0/server.jar"
10-
;;
11-
*)
12-
MINECRAFT_DOWNLOAD="https://s3.amazonaws.com/Minecraft.Download/versions/$VANILLA_VERSION/$SERVER"
137

14-
;;
15-
esac
8+
#########################################
9+
## GET DOWNLOAD URL ##
10+
#########################################
11+
VERSIONMANIFESTURL=`curl -fsSL $VERSIONS_JSON | jq --arg VANILLA_VERSION "$VANILLA_VERSION" --raw-output '[.versions[]|select(.id == $VANILLA_VERSION)][0].url'`
12+
MINECRAFT_DOWNLOAD=`curl -fsSL $VERSIONMANIFESTURL | jq --raw-output '.downloads.server.url'`
1613

1714
#########################################
1815
## DOWNLOAD MINECRAFT ##

0 commit comments

Comments
 (0)