docker-compose base version as build attribute

As shown on in the official doc: and on this post: docker-compose 1.6 "args" attribute on "build", you can pass arguments from docker-compose to the build process.
But, I can’t figure out how to pass directly the base version. The Dockerfile must start with directive FROM, and your argument is available only after calling ARG your-arg-name.

Does anybody know of a solution to perform this? FROM ubuntu:$UBUNTU_VERSION?

  • Unable to access Asp.Net vNext application hosted in Docker Container in Windows Server 2016 Azure VM [Solved]
  • docker daemon -H fd:// error out in shell
  • Searching a Docker Image for a particular file
  • Concourse CI will not run Hello-World after setting up with the official docker image. It fails showing “no workers”
  • Dockerfile COPY files not showing on VOLUME
  • How do I resolve hostnames to Docker containers from the host?
  • Cheers,

  • DNS Server in Docker Container
  • docker-compose yml running a script after up
  • what is the use of HOST and NONE network in docker?
  • Error on “docker-compose” when I use by pipe with sh ( echo “docker-compose… ” | sh )
  • Accessing the number of arguments pass into a docker run command script
  • Ports On Docker
  • Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.