terraria/Dockerfile

27 lines
639 B
Text
Raw Normal View History

FROM ubuntu
ENV TERRARIA_VERISON=1344
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
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:34:49 +00:00
ADD config.ini ${SERVER}/config.ini.default
ADD start.sh ${SERVER}/start.sh
VOLUME /data
EXPOSE 7777/udp 7777
2015-11-22 12:34:49 +00:00
ENTRYPOINT ["/home/gameserver/terraria/start.sh"]
CMD ["--"]