1
0
mirror of https://github.com/LpmRaven/factorio-docker-server.git synced 2024-12-12 08:24:07 +02:00
factorio-docker-server/Dockerfile

35 lines
1.0 KiB
Docker
Raw Normal View History

2021-09-05 02:48:45 +02:00
FROM ubuntu
2016-03-04 09:55:08 +02:00
2021-09-05 02:48:45 +02:00
MAINTAINER Liam Raven <https://github.com/LpmRaven>
2016-03-04 09:55:08 +02:00
RUN apt-get update \
&& apt-get install -y wget \
&& apt-get clean \
2016-03-04 09:55:08 +02:00
&& rm -rf /var/lib/apt/lists/*
RUN useradd -m -d /opt/factorio -s /bin/bash factorio \
&& chown -R factorio.factorio /opt/factorio
USER factorio
2016-10-03 21:56:10 +02:00
ENV HOME /opt/factorio
2016-10-03 21:56:10 +02:00
ENV SAVEFILE /opt/factorio/saves/factorio_save.zip
2021-09-05 02:56:21 +02:00
ENV MAPGENSETTINGS /opt/factorio/map-gen-settings.json
ENV MAPSETTINGS /opt/factorio/map-settings.json
2016-12-17 23:31:42 +02:00
ENV SERVERSETTINGS /opt/factorio/server-settings.json
2016-10-03 21:56:10 +02:00
WORKDIR /opt/factorio
2021-09-05 02:56:21 +02:00
RUN wget -q -O - https://factorio.com/get-download/stable/headless/linux64 \
| 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 -xzf /tmp/factorio.tar.gz -C /opt \
&& rm -rf /tmp/factorio.tar.gz
2016-03-04 09:55:08 +02:00
2016-12-17 23:31:42 +02:00
ADD map-gen-settings.json /opt/factorio/
ADD server-settings.json /opt/factorio/
2016-03-04 09:55:08 +02:00
ADD init.sh /opt/factorio/
EXPOSE 34197/udp
2016-03-04 09:55:08 +02:00
CMD ["./init.sh"]