factorio/Dockerfile

36 lines
1 KiB
Text
Raw Normal View History

FROM debian:stretch
2016-12-15 00:37:56 +00:00
ENV FACTORIO_SERVER_VERSION=0.16.51 \
DUMB_INIT_VERSION=1.2.1 \
GOSU_VERSION=1.10
2016-12-15 00:37:56 +00:00
RUN set -ex \
&& apt-get update \
&& apt-get install --no-install-recommends -y \
ca-certificates \
curl \
xz-utils \
&& curl -sSfLo /usr/local/bin/dumb-init "https://github.com/Yelp/dumb-init/releases/download/v${DUMB_INIT_VERSION}/dumb-init_${DUMB_INIT_VERSION}_amd64" \
&& curl -sSfLo /usr/local/bin/gosu "https://github.com/tianon/gosu/releases/download/${GOSU_VERSION}/gosu-amd64" \
&& chmod +x \
/usr/local/bin/dumb-init \
/usr/local/bin/gosu \
2016-12-15 00:37:56 +00:00
&& mkdir -p /opt \
&& curl -sSLf "https://www.factorio.com/get-download/${FACTORIO_SERVER_VERSION}/headless/linux64" | \
tar -C /opt -x -J \
2016-12-15 00:37:56 +00:00
&& useradd -d /opt/factorio -M -u 10000 factorio \
&& apt-get purge -y \
ca-certificates \
curl \
xz-utils \
&& apt-get autoremove -y --purge \
&& rm -rf /var/lib/apt/lists/*
ENTRYPOINT ["/opt/defaults/start.sh"]
EXPOSE 34197/udp
2016-12-15 00:37:56 +00:00
COPY . /opt/defaults
2016-12-15 00:37:56 +00:00
VOLUME /data
WORKDIR /data