2017-09-05 00:07:33 +02:00
|
|
|
FROM debian:stretch
|
2017-04-30 21:58:44 +02:00
|
|
|
EXPOSE 34197/udp
|
|
|
|
|
2017-09-05 00:07:33 +02:00
|
|
|
ENV FACTORIO_VERSION 0.15.33
|
|
|
|
|
|
|
|
ADD bin/entrypoint.sh /entrypoint.sh
|
|
|
|
|
2017-04-30 21:58:44 +02:00
|
|
|
RUN \
|
|
|
|
apt-get --yes update &&\
|
|
|
|
apt-get --yes install wget xz-utils &&\
|
2017-09-05 00:07:33 +02:00
|
|
|
apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* &&\
|
|
|
|
adduser --disabled-password --gecos "" --home /opt/factorio factorio &&\
|
|
|
|
chmod 755 /entrypoint.sh &&\
|
|
|
|
mkdir -p /opt/factorio/headless /opt/factorio/saves &&\
|
|
|
|
chown -R factorio /opt/factorio
|
2017-04-30 21:58:44 +02:00
|
|
|
|
2017-09-05 00:07:33 +02:00
|
|
|
USER factorio
|
2017-04-30 21:58:44 +02:00
|
|
|
RUN \
|
2017-09-05 00:07:33 +02:00
|
|
|
wget -O /tmp/headless.tgz https://www.factorio.com/get-download/$FACTORIO_VERSION/headless/linux64 &&\
|
|
|
|
tar xfv /tmp/headless.tgz -C /opt/factorio/headless && rm /tmp/headless.tgz
|
2017-04-30 21:58:44 +02:00
|
|
|
|
2017-09-05 00:07:33 +02:00
|
|
|
ADD default-config.json /opt/factorio/headless/factorio/config/default.json
|
|
|
|
|
|
|
|
VOLUME /opt/factorio/saves
|
2017-04-30 21:58:44 +02:00
|
|
|
|
|
|
|
ENTRYPOINT ["/entrypoint.sh"]
|
|
|
|
CMD ["--server-settings", "config/default.json"]
|