2024-02-23 15:14:57 +01:00
|
|
|
FROM debian:bullseye
|
2017-04-30 21:58:44 +02:00
|
|
|
EXPOSE 34197/udp
|
|
|
|
|
2020-08-12 13:09:16 +02:00
|
|
|
# you can configure this by passing --build-arg=FACTORIO_VERSION=0.17.79
|
2024-02-23 15:14:57 +01:00
|
|
|
ARG FACTORIO_VERSION=1.1.104
|
2017-09-05 00:07:33 +02:00
|
|
|
|
|
|
|
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 \
|
2024-02-23 15:14:57 +01:00
|
|
|
wget -O- https://factorio.com/get-download/$FACTORIO_VERSION/headless/linux64 \
|
|
|
|
| tar xvJ -C /opt/factorio/headless
|
|
|
|
|
|
|
|
RUN mkdir /opt/factorio/headless/factorio/config/
|
|
|
|
ADD bin/config.ini /opt/factorio/headless/factorio/config/config.ini
|
|
|
|
RUN sed -i '/write-data=/c\write-data=\/opt\/factorio/' /opt/factorio/headless/factorio/config/config.ini
|
2017-04-30 21:58:44 +02:00
|
|
|
|
2017-09-05 00:07:33 +02:00
|
|
|
VOLUME /opt/factorio/saves
|
2017-04-30 21:58:44 +02:00
|
|
|
|
2018-09-23 20:09:54 +02:00
|
|
|
WORKDIR /opt/factorio
|
|
|
|
|
2017-04-30 21:58:44 +02:00
|
|
|
ENTRYPOINT ["/entrypoint.sh"]
|
2024-02-23 15:14:57 +01:00
|
|
|
CMD ["--server-settings","/opt/factorio/settings/server-settings.json"]
|