Files
minecraft/vanilla/Dockerfile
2023-11-12 08:54:12 -08:00

34 lines
872 B
Docker

FROM fithwum/debian-base:bullseye
LABEL maintainer "fithwum"
# Environment Variables
ENV ACCEPT_EULA=""
ENV GAME_PORT=""
ENV MC_VERSION=""
ENV XMX=""
ENV XMS=""
ENV XMN=""
# URL's for files
ARG INSTALL_SCRIPT=https://gitlab.fithwum.tech/fithwum/minecraft/-/raw/master/vanilla/install_script.sh
# Install java-17 & Dependencies.
RUN apt-get -y update \
&& apt-get -y --fix-broken install \
&& apt-get install -y software-properties-common screen openjdk-17-jdk jq curl \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* \
&& update-ca-certificates -f;
# Folder creation.
RUN mkdir -p /MCserver /MCtemp \
&& chmod 777 -R /MCserver /MCtemp \
&& chown 99:100 -R /MCserver /MCtemp
ADD "$INSTALL_SCRIPT" /MCtemp
RUN chmod +x /MCtemp/install_script.sh
# Directory where data is stored
VOLUME /MCserver
# Run command
CMD [ "/bin/bash", "./MCtemp/install_script.sh" ]