Docker Compose CLI Flags

I am not sure how to run the equivalent of the docker-composefollowing ...

docker run -d -p 8080:9000 -v /var/run/docker.sock:/var/run/docker.sock portainer/portainer --logo "https://www.docker.com/sites/all/themes/docker/assets/images/brand-full.svg"`

So far I have the following, which I know works ...

ui:   
   image: portainer/portainer
   container_name: ui
   restart: always
   volumes:
     - '/var/run/docker.sock:/var/run/docker.sock'
   expose:
     - 9000
   ports:
     - 8080:9000

In particular, I cannot understand how the flag transforms --logo.

+4
source share
1 answer

docker rundoes not mention the parameter --logo in the manual page of the manual .

This means that this may mean passing the parameter to the CMD default containerportainer/portainer . This is similar to issue 399 :

You can use the CLI flags in the command field of your file to build dockers:

  ui:
    image: portainer/portainer
    command: portainer --logo http://mylogo.com -l owner=acme --templates http://mytemplates.com
    container_name: ui
    restart: always
    volumes:
      - '/var/run/docker.sock:/var/run/docker.sock' 

Tony docker-compose

+3

Source: https://habr.com/ru/post/1664236/


All Articles