support older versions of docker and docker-compose (#414)

This commit is contained in:
Paul Robertson
2021-09-09 11:13:45 -04:00
committed by GitHub
parent 765d2bb23d
commit d6154359d9
3 changed files with 24 additions and 7 deletions

View File

@ -13,8 +13,8 @@ ARG SHA256
ENV PORT=34197 \
RCON_PORT=27015 \
VERSION=${VERSION:?} \
SHA256=${SHA256:?} \
VERSION=${VERSION} \
SHA256=${SHA256} \
SAVES=/factorio/saves \
CONFIG=/factorio/config \
MODS=/factorio/mods \
@ -25,6 +25,14 @@ ENV PORT=34197 \
SHELL ["/bin/ash", "-eo", "pipefail", "-c"]
RUN set -ox pipefail \
&& if [[ "${VERSION}" == "" ]]; then \
echo "build-arg VERSION is required" \
&& exit 1; \
fi \
&& if [[ "${SHA256}" == "" ]]; then \
echo "build-arg SHA256 is required" \
&& exit 1; \
fi \
&& archive="/tmp/factorio_headless_x64_$VERSION.tar.xz" \
&& mkdir -p /opt /factorio \
&& apk add --update --no-cache --no-progress bash binutils curl file gettext jq libintl pwgen shadow su-exec \

View File

@ -1,7 +1,13 @@
version: '2'
services:
factorio:
build: .
build:
context: .
args:
# Check buildinfo.json for supported versions and SHAs
# https://github.com/factoriotools/factorio-docker/blob/master/buildinfo.json
- VERSION=1.1.39
- SHA256=5528b8e23ac5d3a13e3328a0c64fee71f4a321792afe7b2fe46f95e62b7ed119
ports:
- "34197:34197/udp"
- "27015:27015/tcp"