How to run docker-compose on remote host?

前端 未结 6 1260
刺人心
刺人心 2021-01-31 16:53

I have compose file locally. How to run bundle of containers on remote host like docker-compose up -d with DOCKER_HOST=?

6条回答
  •  谎友^
    谎友^ (楼主)
    2021-01-31 17:16

    You can now use docker contexts for this:

    docker context create dev ‐‐docker “host=ssh://user@remotemachine”

    docker-compose ‐‐context dev up -d

    More info here: https://www.docker.com/blog/how-to-deploy-on-remote-docker-hosts-with-docker-compose/

提交回复
热议问题