2018-06-19 11:14:45 +00:00
|
|
|
FROM debian:stretch
|
2016-12-15 00:37:56 +00:00
|
|
|
|
2018-06-19 11:14:45 +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 \
|
2018-06-19 11:14:45 +00:00
|
|
|
&& 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 \
|
2018-06-19 11:14:45 +00:00
|
|
|
&& 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 \
|
2018-06-19 11:14:45 +00:00
|
|
|
&& 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
|
|
|
|
2018-06-19 11:14:45 +00:00
|
|
|
COPY . /opt/defaults
|
2016-12-15 00:37:56 +00:00
|
|
|
|
|
|
|
VOLUME /data
|
|
|
|
WORKDIR /data
|