mirror of
https://github.com/dragonlock2/matthewtran.com.git
synced 2026-06-28 01:58:34 +00:00
switch to non-root user in container
This commit is contained in:
@@ -0,0 +1 @@
|
||||
worlds/
|
||||
+8
-6
@@ -1,19 +1,21 @@
|
||||
FROM ubuntu:22.04
|
||||
|
||||
WORKDIR /root
|
||||
|
||||
RUN apt-get update && apt-get upgrade
|
||||
RUN apt-get install -y wget unzip
|
||||
|
||||
RUN useradd -m matt
|
||||
USER matt
|
||||
WORKDIR /home/matt
|
||||
|
||||
# from https://terraria.fandom.com/wiki/Server (currently 1.4.4.9)
|
||||
RUN wget https://terraria.org/api/download/pc-dedicated-server/terraria-server-1449.zip
|
||||
RUN unzip terraria-server-1449.zip && rm terraria-server-1449.zip
|
||||
RUN mv 1449/ server/
|
||||
|
||||
COPY entry.sh ./
|
||||
COPY --chown=matt:matt entry.sh ./
|
||||
|
||||
WORKDIR /root/server/Linux
|
||||
WORKDIR /home/matt/server/Linux
|
||||
|
||||
RUN chmod +x TerrariaServer.bin.x86_64
|
||||
COPY password.default ./password.txt
|
||||
COPY config.txt password.tx[t] ./
|
||||
COPY --chown=matt:matt password.default ./password.txt
|
||||
COPY --chown=matt:matt config.txt password.tx[t] ./
|
||||
|
||||
+2
-2
@@ -1,5 +1,5 @@
|
||||
world=/root/worlds/default.wld
|
||||
world=/home/matt/worlds/default.wld
|
||||
autocreate=3
|
||||
worldname=default
|
||||
difficulty=2
|
||||
worldpath=/root/worlds
|
||||
worldpath=/home/matt/worlds
|
||||
|
||||
Reference in New Issue
Block a user