factoriotools / factorio-docker

Factorio headless server in a Docker container
https://hub.docker.com/r/factoriotools/factorio/
MIT License
909 stars 220 forks source link

"${VERSION:?}" causing errors in latest updates #412

Closed synapseattack closed 2 years ago

synapseattack commented 2 years ago

In the latest build running the included docker-compose yaml I'm getting the following:

docker-compose -f docker-compose.yml up Building factorio Step 1/16 : FROM frolvlad/alpine-glibc:alpine-3.14 ---> 467087a1c588 Step 2/16 : LABEL maintainer="https://github.com/factoriotools/factorio-docker" ---> Using cache ---> 92c726f8b740 Step 3/16 : ARG USER=factorio ---> Using cache ---> c814756914e7 Step 4/16 : ARG GROUP=factorio ---> Using cache ---> 6d46651143d9 Step 5/16 : ARG PUID=845 ---> Using cache ---> 1bc656c9a19d Step 6/16 : ARG PGID=845 ---> Using cache ---> c44527cfbbba Step 7/16 : ARG VERSION ---> Using cache ---> 5085cab1567f Step 8/16 : ARG SHA256 ---> Using cache ---> 684acba40201 Step 9/16 : ENV PORT=34197 RCON_PORT=27015 VERSION=${VERSION:?} SHA256=${SHA256:?} SAVES=/factorio/saves CONFIG=/factorio/config MODS=/factorio/mods SCENARIOS=/factorio/scenarios SCRIPTOUTPUT=/factorio/script-output PUID="$PUID" PGID="$PGID" ERROR: Service 'factorio' failed to build: failed to process "${VERSION:?}": unsupported modifier (?) in substitution

Fank commented 2 years ago

Looks like the docker-compose file is missing some of the latest updates

Fank commented 2 years ago

@perobertson any idea how to handle the version parameter when starting with docker-compose?

perobertson commented 2 years ago

I put together a PR with a fix that should work. Unfortunately its difficult to test with older versions of docker and I am not 100% sure if docker behaves the same way when building on different host operating systems.

For context I was able to build the image in the PR with

Fank commented 2 years ago

Should be fixed with latest version of master

synapseattack commented 2 years ago

confirmed fixed for me. Thank for the quick turn around!