2015-11-22 12:25:25 +00:00
|
|
|
FROM ubuntu
|
|
|
|
|
2018-01-06 20:21:57 +00:00
|
|
|
ENV TERRARIA_VERISON=1344
|
2015-11-22 12:25:25 +00:00
|
|
|
|
|
|
|
RUN apt-get update \
|
2016-06-23 09:02:43 +00:00
|
|
|
&& apt-get install -y bash curl unzip \
|
|
|
|
&& adduser gameserver \
|
|
|
|
&& mkdir /data && chown gameserver: /data
|
2015-11-22 12:25:25 +00:00
|
|
|
|
|
|
|
USER gameserver
|
|
|
|
ENV HOME /home/gameserver
|
|
|
|
ENV SERVER $HOME/terraria
|
|
|
|
|
|
|
|
RUN mkdir -p ${SERVER} \
|
2016-06-23 09:02:43 +00:00
|
|
|
&& curl -sSLo /tmp/terraria.zip http://terraria.org/server/terraria-server-${TERRARIA_VERISON}.zip \
|
|
|
|
&& unzip -d ${SERVER} /tmp/terraria.zip \
|
|
|
|
&& ln -s ${SERVER}/terraria-server-* ${SERVER}/server
|
2015-11-22 12:25:25 +00:00
|
|
|
|
2015-11-22 12:34:49 +00:00
|
|
|
ADD config.ini ${SERVER}/config.ini.default
|
|
|
|
ADD start.sh ${SERVER}/start.sh
|
|
|
|
|
2015-11-22 12:25:25 +00:00
|
|
|
VOLUME /data
|
|
|
|
EXPOSE 7777/udp 7777
|
|
|
|
|
2015-11-22 12:34:49 +00:00
|
|
|
ENTRYPOINT ["/home/gameserver/terraria/start.sh"]
|
|
|
|
CMD ["--"]
|