Search code examples
dockerdocker-composeconfigurationlocalportainer

Configuring portainer(-ce) from docker-compose.yml


My docker-compose.yml:

version: "3"
services:
    [...]
    portainer:
        image: portainer/portainer-ce
        ports:
            - "10280:9000"
        volumes:
            - "/var/run/docker.sock:/var/run/docker.sock"
            - "./portainer:/data"
        restart: unless-stopped

        command: --admin-password $$2b$$05$$XJA5Fr6FGLsptH8mb2/L2uwH2mXGDJkfbTUkpuFEnSkpWY9D2EKCO
    [...]

(the "[...]" just is for other services which aren't related to the problem)

I configured the admin password with command: --admin-password [bcryptHash] but how do I configure it to use the local / "volumed" docker instance / socket from docker-compose and not from the web interface?


Solution

  • Try using this command

    command: -H unix:///var/run/docker.sock