mirror of
https://github.com/carloe/docker-factorio.git
synced 2025-01-11 17:18:20 +02:00
30 lines
775 B
Docker
30 lines
775 B
Docker
FROM ubuntu:22.10
|
|
|
|
MAINTAINER Carlo Eugster <carlo@relaun.ch>
|
|
|
|
RUN apt-get update \
|
|
&& apt-get install -y wget xz-utils \
|
|
&& apt-get clean \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
RUN useradd -m -d /opt/factorio -s /bin/bash factorio \
|
|
&& chown -R factorio.factorio /opt/factorio
|
|
USER factorio
|
|
|
|
ENV HOME /opt/factorio
|
|
ENV SAVEFILE /opt/factorio/saves/factorio_save.zip
|
|
|
|
WORKDIR /opt/factorio
|
|
|
|
RUN wget -q -O - https://www.factorio.com/download-headless \
|
|
| grep -o -m1 "/get-download/.*/headless/linux64" \
|
|
| awk '{print "--no-check-certificate https://www.factorio.com"$1" -q -O /tmp/factorio.tar.gz"}' \
|
|
| xargs wget \
|
|
&& tar -xf /tmp/factorio.tar.gz -C /opt \
|
|
&& rm -rf /tmp/factorio.tar.gz
|
|
|
|
ADD init.sh /opt/factorio/
|
|
|
|
EXPOSE 34197/udp
|
|
CMD ["./init.sh"]
|