docker-compose base version as build attribute

As shown on in the official doc: https://docs.docker.com/compose/compose-file/#args 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?

  • Docker 32-bit Image downloaded, but tells its a 64-bit architecture
  • volume mounts preventing startup in container
  • Is it possible to start multi physical node hadoop clustster using docker?
  • What is the purpose of the Docker build context?
  • boot2docker, docker, django on mac os x
  • Docker on Windows (Boot2Docker) - certificate signed by unknown authority error
  • Cheers,
    Olivier.

  • What tool can manage Docker container to start in order?
  • Docker - Replacement for `dockerd` on Mac
  • Wordpress on docker-compose no run
  • Profiling a C# dot net application running on a docker container
  • Docker logging to container
  • directly copy the folder in webapps of tomcat instead of war
  • Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.