1

码头工人-compose.yml

    version: '3'

services:
  # Your other service definitions here.

  # Portainer
  portainerservice:
    image: portainer/portainer
    volumes:
      - portainer_data:/data
      - /var/run/docker.sock:/var/run/docker.sock
      - portainer_password:/tmp/portainer_password
    ports:
      - "9000:9000"


volumes:
  portainer_data:

我需要使用两个单独工作的命令,但我怎样才能一起使用呢?

command:  
      # - -H unix:///var/run/docker.sock
      # - --admin-password-file '/tmp/portainer_password'
4

2 回答 2

1

我相信您应该能够将它们作为一行运行:

portainerservice:
  image: portainer/portainer
  command: 
      - --admin-password-file '/tmp/portainer_password' -H unix:///var/run/docker.sock

您可能在文档中也有好运:https ://porttainer.readthedocs.io/en/stable/configuration.html#inside-a-file

于 2020-03-21T12:00:33.537 回答
1

你可以试试这个-

命令:-c 'first_command && second_command2'

于 2020-03-20T09:48:06.880 回答