factorio/Dockerfile

24 lines
573 B
Text
Raw Normal View History

2016-12-15 00:37:56 +00:00
FROM debian
ENV FACTORIO_SERVER_VERSION 0.14.21
ENTRYPOINT ["/opt/defaults/start.sh"]
EXPOSE 34197/udp
2016-12-15 00:42:19 +00:00
CMD ["help"]
2016-12-15 00:37:56 +00:00
ADD https://www.factorio.com/get-download/${FACTORIO_SERVER_VERSION}/headless/linux64 /tmp/factorio.tgz
ADD . /opt/defaults
RUN set -ex \
&& mkdir -p /opt \
&& useradd -d /opt/factorio -M -u 10000 factorio \
&& tar -C /opt -x -z -f /tmp/factorio.tgz \
&& chown -R factorio:factorio /opt/factorio \
2016-12-15 03:37:34 +00:00
&& rm /tmp/factorio.tgz \
&& sed -i "s;^write-data=.*$;write-data=/data;" /opt/factorio/config/config.ini
2016-12-15 00:37:56 +00:00
USER factorio
VOLUME /data
WORKDIR /data