-
-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathDockerfile
39 lines (32 loc) · 1.06 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
FROM ich777/debian-baseimage
LABEL org.opencontainers.image.authors="admin@minenet.at"
LABEL org.opencontainers.image.source="https://github.com/ich777/docker-terraria-server"
RUN apt-get update && \
apt-get -y install --no-install-recommends screen unzip curl && \
rm -rf /var/lib/apt/lists/*
RUN wget -O /tmp/gotty.tar.gz https://github.com/yudai/gotty/releases/download/v1.0.1/gotty_linux_amd64.tar.gz && \
tar -C /usr/bin/ -xvf /tmp/gotty.tar.gz && \
rm -rf /tmp/gotty.tar.gz
ENV DATA_DIR="/serverdata"
ENV SERVER_DIR="${DATA_DIR}/serverfiles"
ENV GAME_VERSION="template"
ENV GAME_MOD="template"
ENV GAME_PARAMS="template"
ENV TERRARIA_SRV_V="1.4.3.6"
ENV ENABLE_WEBCONSOLE="true"
ENV GOTTY_PARAMS="-w --title-format Terraria"
ENV UMASK=000
ENV UID=99
ENV GID=100
ENV DATA_PERM=770
ENV USER="terraria"
RUN mkdir $DATA_DIR && \
mkdir $SERVER_DIR && \
useradd -d $DATA_DIR -s /bin/bash $USER && \
chown -R $USER $DATA_DIR && \
ulimit -n 2048
ADD /scripts/ /opt/scripts/
ADD /config/ /config/
RUN chmod -R 777 /opt/scripts/
#Server Start
ENTRYPOINT ["/opt/scripts/start.sh"]