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?

  • can't access internet from the docker container runngin ubuntu 14.04
  • Configuring Hipache with etcd
  • Persistent volumes in docker engine swarm mode across multiple nodes
  • Can you control Docker run parameters in Dockerfile
  • Dockerized Spring Cloud Stream services with Kafka broker unable to connect to Zookeeper
  • Creating a Docker Image for a Github Project
  • Cheers,

  • docker-compose run doesn't work in windows
  • Docker remove container error
  • docker login with non interactive session returns 401
  • Unable to provide CLASSPATH in docker?
  • How to mount Hadoop HDFS
  • Haproxy reload with different backend server ip
  • Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.