factorio/Dockerfile
2020-08-12 13:09:16 +02:00

29 lines
914 B
Docker

FROM debian:stretch
EXPOSE 34197/udp
# you can configure this by passing --build-arg=FACTORIO_VERSION=0.17.79
ARG FACTORIO_VERSION=0.17.79
ADD bin/entrypoint.sh /entrypoint.sh
RUN \
apt-get --yes update &&\
apt-get --yes install wget xz-utils &&\
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
USER factorio
RUN \
wget -O- https://www.factorio.com/get-download/$FACTORIO_VERSION/headless/linux64 \
|tar xvJ -C /opt/factorio/headless
VOLUME /opt/factorio/saves
WORKDIR /opt/factorio
ENTRYPOINT ["/entrypoint.sh"]
CMD ["--server-settings", "/opt/factorio/config/config.json","--map-gen-settings","/opt/factorio/config/mapgen.json","--map-settings","/opt/factorio/config/map.json"]