diff --git a/04rel64/Dockerfile b/04rel64/Dockerfile index ff635b0..00bc40e 100644 --- a/04rel64/Dockerfile +++ b/04rel64/Dockerfile @@ -1,4 +1,4 @@ -FROM debian:stable +FROM debian:stretch MAINTAINER Thijn @@ -8,13 +8,29 @@ RUN apt-get update && apt-get install -y \ unzip \ p7zip \ openjdk-8-jre-headless \ + openjdk-8-jdk-headless \ + libstdc++6 \ + valgrind \ + libasan3 \ + gcc \ + g++ \ + build-essential \ + libcurl3 \ && adduser --disabled-password --home /home/container container +RUN mkdir -p /usr/lib/jvm/java-12-openjdk-amd64 && cd /usr/lib/jvm/java-12-openjdk-amd64 && \ + wget 'https://download.java.net/java/GA/jdk12.0.2/e482c34c86bd4bf8b56c0b35558996b9/10/GPL/openjdk-12.0.2_linux-x64_bin.tar.gz' && \ + tar -xzv --strip-components=1 -f openjdk-12.0.2_linux-x64_bin.tar.gz + +RUN apt-get install -y screen gdb +RUN cd /tmp && wget 'http://security.debian.org/debian-security/pool/updates/main/o/openssl/libssl1.0.0_1.0.1t-1+deb8u12_amd64.deb' && \ +dpkg -i libssl1.0.0_1.0.1t-1+deb8u12_amd64.deb && rm libssl1.0.0_1.0.1t-1+deb8u12_amd64.deb + USER container ENV USER container ENV HOME /home/container -ENV VCMP_VERSION v22 -ENV VCMP_PLUGIN_PATCH patch7 +ENV VCMP_VERSION v30 +ENV VCMP_PLUGIN_PATCH patch2 WORKDIR /home/container diff --git a/04rel64/build.sh b/04rel64/build.sh new file mode 100755 index 0000000..14851fd --- /dev/null +++ b/04rel64/build.sh @@ -0,0 +1,2 @@ +#!/bin/bash +docker build -t vcmp_04rel64 . diff --git a/04rel64/publish.sh b/04rel64/publish.sh new file mode 100755 index 0000000..1a6e5fb --- /dev/null +++ b/04rel64/publish.sh @@ -0,0 +1,3 @@ +#!/bin/bash +docker tag vcmp_04rel64 docker.panel2.viceunderdogs.com/vcmp-04rel64 +docker push docker.panel2.viceunderdogs.com/vcmp-04rel64 diff --git a/04rel64/start.sh b/04rel64/start.sh index 8678ea2..26f02cd 100644 --- a/04rel64/start.sh +++ b/04rel64/start.sh @@ -10,10 +10,10 @@ else mkdir plugins cd plugins/ - wget -q http://v04.thijn.ovh/allplugins_04rel004_${VCMP_PLUGIN_PATCH}.7z - p7zip -d allplugins_04rel004_${VCMP_PLUGIN_PATCH}.7z + wget -q http://v04.thijn.ovh/allplugins_04rel006_${VCMP_PLUGIN_PATCH}.7z + p7zip -d allplugins_04rel006_${VCMP_PLUGIN_PATCH}.7z chmod 700 * - rm -f allplugins_04rel004_${VCMP_PLUGIN_PATCH}.7z + rm -f allplugins_04rel006_${VCMP_PLUGIN_PATCH}.7z rm -f *rel32.* rm -f *.dll @@ -34,8 +34,9 @@ maxplayers ${MAX_SLOTS} " > server.cfg fi - +cd /home/container/ MODIFIED_STARTUP=`echo ${STARTUP} | perl -pe 's@\{\{(.*?)\}\}@$ENV{$1}@g'` -${MODIFIED_STARTUP} +echo "Startup: ${MODIFIED_STARTUP}" +eval ${MODIFIED_STARTUP} exit 0 diff --git a/sqmod/Dockerfile b/sqmod/Dockerfile new file mode 100644 index 0000000..792fb8f --- /dev/null +++ b/sqmod/Dockerfile @@ -0,0 +1,29 @@ +FROM debian:latest + +MAINTAINER Thijn + +# Install packages +RUN apt-get update && apt-get install -y \ + wget \ + unzip \ + p7zip \ + libstdc++6 \ + gcc \ + g++ \ + build-essential \ + libmariadb3 \ + libcurl4 \ + libpq5 \ + && adduser --disabled-password --home /home/container container + +USER container +ENV USER container +ENV HOME /home/container +ENV VCMP_VERSION v30 +ENV VCMP_PLUGIN_PATCH patch2 + +WORKDIR /home/container + +COPY ./start.sh /start.sh + +CMD ["/bin/bash", "/start.sh"] diff --git a/sqmod/build.sh b/sqmod/build.sh new file mode 100755 index 0000000..e93c6e1 --- /dev/null +++ b/sqmod/build.sh @@ -0,0 +1,2 @@ +#!/bin/bash +docker build -t vcmp_04rel64:sqmod . diff --git a/sqmod/publish.sh b/sqmod/publish.sh new file mode 100755 index 0000000..6f3a6d5 --- /dev/null +++ b/sqmod/publish.sh @@ -0,0 +1,3 @@ +#!/bin/bash +docker tag vcmp_04rel64:sqmod docker.panel2.viceunderdogs.com/vcmp-04rel64:sqmod +docker push docker.panel2.viceunderdogs.com/vcmp-04rel64:sqmod diff --git a/sqmod/start.sh b/sqmod/start.sh new file mode 100644 index 0000000..26f02cd --- /dev/null +++ b/sqmod/start.sh @@ -0,0 +1,42 @@ +#!/bin/bash +CHK_FILE="/home/container/mpsvrrel64" +if [ -f $CHK_FILE ]; then + echo "VC:MP executable exists, not downloading. To update, delete mpsvrrel64." +else + wget -q http://v04.thijn.ovh/server/VCMP04_server_${VCMP_VERSION}_linux64.zip + unzip VCMP04_server_${VCMP_VERSION}_linux64.zip + rm -f VCMP04_server_${VCMP_VERSION}_linux64.zip + echo "Downloaded VC:MP Server version ${VCMP_VERSION}" + + mkdir plugins + cd plugins/ + wget -q http://v04.thijn.ovh/allplugins_04rel006_${VCMP_PLUGIN_PATCH}.7z + p7zip -d allplugins_04rel006_${VCMP_PLUGIN_PATCH}.7z + chmod 700 * + rm -f allplugins_04rel006_${VCMP_PLUGIN_PATCH}.7z + rm -f *rel32.* + rm -f *.dll + + cd /home/container + chmod +x mpsvrrel64 + find +fi + +if [ -f "/home/container/server.cfg" ]; then + echo "server.cfg exists, not generating file." +else + echo " +gamemode Default mode +plugins squirrel04rel64 sqlite04rel64 hashing04rel64 sockets04rel64 +port ${SERVER_PORT} +sqgamemode main.nut +maxplayers ${MAX_SLOTS} +" > server.cfg +fi + +cd /home/container/ +MODIFIED_STARTUP=`echo ${STARTUP} | perl -pe 's@\{\{(.*?)\}\}@$ENV{$1}@g'` +echo "Startup: ${MODIFIED_STARTUP}" +eval ${MODIFIED_STARTUP} + +exit 0