Files
minecraft/vanilla/Dockerfile
fithwum 3ebf841293
Some checks failed
Build and Push Minecraft Docker Images / build (push) Failing after 15s
lol
2025-07-03 05:58:12 -07:00

36 lines
1.1 KiB
Docker

FROM gitea.fithwum.tech/fithwum/base-image:debian-bullseye
LABEL maintainer="fithwum"
# Environment Variables
ENV ACCEPT_EULA=""
ENV GAME_PORT=""
ENV MC_VERSION=""
ENV XMX_SIZE=""
ENV XMS_SIZE=""
ENV XMN_SIZE=""
# URL's for files
ARG INSTALL_SCRIPT=https://raw.githubusercontent.com/fithwum/minecraft/refs/heads/master/vanilla/install_script.sh
# Install java-17 & Dependencies.
RUN apt-get -y update && apt-get autoclean && apt-get autoremove \
&& apt-get install -y wget lsb-release
RUN wget https://packages.microsoft.com/config/debian/11/packages-microsoft-prod.deb -O packages-microsoft-prod.deb \
&& dpkg -i packages-microsoft-prod.deb
RUN apt-get -y update && apt-get -y --fix-broken install \
&& apt-get install -y --no-install-recommends msopenjdk-21 screen bzip2 jq \
&& 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" ]