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:

  • Using Docker for local development replacing Vagrant
  • Pass environment variable to a java class using dockerfile
  • How should I run thumbd as a service inside a Docker container?
  • How to specify docker image's DNS?
  • How to properly run migrations and seed a docker MySql DB using Entity Framework Core
  • Tensorflow: unable to navigate to tensorflow folder using docker [Windows 10 Home edition]
  • 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?

  • MessageListenerContainer not listening after crashing master redis instance in redis sentinel in docker env
  • How to docker-compose run in windows?
  • Deploying Docker image to Kubernetes
  • Django + uWSGI + nginx requests hang
  • Deploying node.js web app along with docker
  • Container as volume pattern in windows/vagrant env
  • 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.