further secure containers

This commit is contained in:
Matthew Tran
2025-02-19 22:17:31 -08:00
parent 36c4019c01
commit e7b4e8aa46
15 changed files with 129 additions and 94 deletions
+8 -7
View File
@@ -3,13 +3,14 @@ FROM ubuntu:24.04
RUN apt-get update && apt-get -y upgrade
RUN apt-get install -y wget unzip curl tmux
USER ubuntu
WORKDIR /home/ubuntu
RUN groupadd -g 2002 me && useradd -u 2002 -g 2002 -m me
USER me
WORKDIR /home/me
# from https://www.minecraft.net/en-us/download/server/bedrock (currently 1.21.31.04)
RUN wget -O server.zip --user-agent "Mozilla/5.0" https://www.minecraft.net/bedrockdedicatedserver/bin-linux/bedrock-server-1.21.31.04.zip
# from https://www.minecraft.net/en-us/download/server/bedrock (currently 1.21.61.01)
RUN wget -O server.zip --user-agent "Mozilla/5.0" https://www.minecraft.net/bedrockdedicatedserver/bin-linux/bedrock-server-1.21.61.01.zip
RUN unzip server.zip && rm server.zip
COPY --chown=ubuntu:ubuntu entry.sh ./
COPY --chown=ubuntu:ubuntu server.properties ./
COPY --chown=ubuntu:ubuntu permissions.json ./
COPY --chown=me:me entry.sh ./
COPY --chown=me:me server.properties ./
COPY --chown=me:me permissions.json ./