|
|
|
|
|
FROM python:latest |
|
|
|
|
|
|
|
|
USER root |
|
|
RUN apt-get update && apt-get install -y \ |
|
|
curl \ |
|
|
jq \ |
|
|
wget \ |
|
|
bash \ |
|
|
nano \ |
|
|
git \ |
|
|
imagemagick \ |
|
|
zip \ |
|
|
unzip \ |
|
|
git-lfs \ |
|
|
&& git lfs install \ |
|
|
&& wget https://download.oracle.com/java/21/latest/jdk-21_linux-x64_bin.deb \ |
|
|
&& dpkg -i jdk-21_linux-x64_bin.deb \ |
|
|
&& rm jdk-21_linux-x64_bin.deb \ |
|
|
&& rm -rf /var/lib/apt/lists/* |
|
|
|
|
|
|
|
|
RUN pip install --no-cache-dir --upgrade pip |
|
|
|
|
|
|
|
|
RUN useradd -m -u 1000 user |
|
|
USER user |
|
|
ENV PATH="/home/user/.local/bin:$PATH" |
|
|
|
|
|
|
|
|
WORKDIR /minecraft |
|
|
|
|
|
|
|
|
RUN wget https://raw.githubusercontent.com/KnoxTheDev/main-server/refs/heads/main/eula.txt |
|
|
RUN wget https://raw.githubusercontent.com/KnoxTheDev/main-server/refs/heads/main/server.py |
|
|
RUN wget https://raw.githubusercontent.com/KnoxTheDev/main-server/refs/heads/main/server.properties |
|
|
RUN wget https://raw.githubusercontent.com/KnoxTheDev/main-server/refs/heads/main/start.sh |
|
|
RUN wget https://raw.githubusercontent.com/KnoxTheDev/main-server/refs/heads/main/plugins.sh |
|
|
RUN wget https://raw.githubusercontent.com/KnoxTheDev/main-server/refs/heads/main/server-icon.png |
|
|
RUN wget https://raw.githubusercontent.com/KnoxTheDev/main-server/refs/heads/main/playit.sh |
|
|
RUN wget https://raw.githubusercontent.com/KnoxTheDev/main-server/refs/heads/main/sshx |
|
|
RUN wget https://raw.githubusercontent.com/KnoxTheDev/main-server/refs/heads/main/configs.zip |
|
|
RUN wget https://raw.githubusercontent.com/KnoxTheDev/main-server/refs/heads/main/backup.sh |
|
|
|
|
|
RUN wget --spider https://huggingface.co/datasets/knoxius/primary/resolve/main/worlds.zip && \ |
|
|
wget https://huggingface.co/datasets/knoxius/primary/resolve/main/worlds.zip && unzip worlds.zip && rm worlds.zip || \ |
|
|
echo "worlds.zip not found, skipping download." |
|
|
RUN convert server-icon.png -resize 64x64 server-icon.png |
|
|
RUN sed -i 's/\r$//' playit.sh |
|
|
RUN chmod +x plugins.sh start.sh playit.sh backup.sh sshx |
|
|
|
|
|
|
|
|
RUN pip install --no-cache-dir requests |
|
|
|
|
|
|
|
|
EXPOSE 7860 |
|
|
|
|
|
|
|
|
RUN unzip configs.zip && rm configs.zip |
|
|
|
|
|
|
|
|
CMD python -m http.server 7860 > /dev/null 2>&1 & ./sshx |