How can I combine ENV statement in Dockerfile?

As an exameple with the RUN statement, if my code is:

RUN apt-get update
RUN apt-get install git
RUN apt-get clean

I can do:

  • Docker installation on Ubuntu 12.04 -> cannot connect to daemon
  • Etcd cluster setup failure
  • What is the `<<-EOSQL` code block in Bash when running SQL?
  • Forward container port set by external service at runtime
  • Open port between docker containers
  • Make docker container run forever while being able to gracefully stop
  • RUN apt-get update && apt-get install git && apt-get clean

    If my ENV is:

    ENV POSTGRES_USER postgres
    ENV POSTGRES_DB postgres

    How can I combine ENV statement in one line?

  • How can I define a build directory if a required Docker images doesn't exist
  • How add file in volume for docker image from docker-machine on linux host
  • How to clean up /var/lib/docker/vfs directory
  • Consul for Docker container discovery: how to get latest container in Consul-Template?
  • Capturing stack frames for a particular process using perf
  • Starting fig process with supervisor
  • One Solution collect form web for “How can I combine ENV statement in Dockerfile?”

    Example from the Dockerfile reference

    ENV myName="John Doe" myDog=Rex\ The\ Dog \
    Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.