2019-05-02 17:28:20 +02:00
|
|
|
FROM frolvlad/alpine-glibc:alpine-3.9
|
2017-04-24 18:00:45 +02:00
|
|
|
|
2019-05-15 13:07:30 +02:00
|
|
|
LABEL maintainer="https://github.com/factoriotools/factorio-docker"
|
2017-04-24 18:00:45 +02:00
|
|
|
|
2017-04-24 19:33:21 +02:00
|
|
|
ENV PORT=34197 \
|
2017-11-12 13:49:58 +01:00
|
|
|
RCON_PORT=27015 \
|
2017-11-29 22:48:31 +01:00
|
|
|
VERSION=0.15.40 \
|
|
|
|
SHA1=f79a975f6b8c0ee87e2fa60f7d1f7133f332c3ec
|
2017-04-24 18:00:45 +02:00
|
|
|
|
2019-05-02 17:28:20 +02:00
|
|
|
RUN mkdir -p /opt && \
|
2017-04-24 22:19:30 +02:00
|
|
|
apk add --update --no-cache tini pwgen && \
|
|
|
|
apk add --update --no-cache --virtual .build-deps curl && \
|
2017-04-24 18:00:45 +02:00
|
|
|
curl -sSL https://www.factorio.com/get-download/$VERSION/headless/linux64 \
|
2017-04-24 19:33:21 +02:00
|
|
|
-o /tmp/factorio_headless_x64_$VERSION.tar.xz && \
|
|
|
|
echo "$SHA1 /tmp/factorio_headless_x64_$VERSION.tar.xz" | sha1sum -c && \
|
|
|
|
tar xf /tmp/factorio_headless_x64_$VERSION.tar.xz --directory /opt && \
|
2017-12-06 21:46:45 +01:00
|
|
|
chmod -R ugo=rwx /opt/factorio && \
|
2017-04-24 19:33:21 +02:00
|
|
|
rm /tmp/factorio_headless_x64_$VERSION.tar.xz && \
|
2017-04-24 18:00:45 +02:00
|
|
|
ln -s /factorio/saves /opt/factorio/saves && \
|
2017-04-24 22:19:30 +02:00
|
|
|
ln -s /factorio/mods /opt/factorio/mods && \
|
|
|
|
apk del .build-deps
|
2017-04-24 18:00:45 +02:00
|
|
|
|
|
|
|
VOLUME /factorio
|
|
|
|
|
2017-11-12 13:49:58 +01:00
|
|
|
EXPOSE $PORT/udp $RCON_PORT/tcp
|
2017-04-24 18:00:45 +02:00
|
|
|
|
|
|
|
COPY ./docker-entrypoint.sh /
|
|
|
|
|
|
|
|
ENTRYPOINT ["/sbin/tini", "--"]
|
|
|
|
CMD ["/docker-entrypoint.sh"]
|