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

support older versions of docker and docker-compose #414

Closed perobertson closed 2 years ago

perobertson commented 2 years ago

Related: https://github.com/factoriotools/factorio-docker/issues/412

This should fix the issue where some people are seeing this error message when using a docker compose setup.

 ERROR: Service 'factorio' failed to build: failed to process "${VERSION:?}": unsupported modifier (?) in substitution

I could not find the exact version where docker changed or added support for the variable substitution, so the next best thing was to not use it and add in a check for the value.

I did find that docker-compose >= 1.6.0 is needed because this project is using v2 of the compose spec

The other option I see here is to have buildinfo.json added into the container and then have the docker file determine which version to install when VERSION is unset. If we want to go down that route, Id suggest doing that as a follow up PR so that this unblocks users from using docker-compose and having it build the image.