docker-stack

Deploy traefik with docker stack on Windows Server 2019

二次信任 提交于 2020-04-07 08:04:51
问题 I want to run traefik on a docker swarm cluster powered by Windows Server 2019. It works while using docker network create and docker service create commands directly. But a seemingly identical compose file does not work. Any help is appreciated. PowerShell commands: # create network docker network create proxy --driver overlay --subnet 11.0.0.0/24 --gateway 11.0.0.1 # start traefik docker service create ` --name traefik ` --constraint node.role==manager ` --publish 80:80 ` --publish 8080

Deploy traefik with docker stack on Windows Server 2019

点点圈 提交于 2020-04-07 08:03:41
问题 I want to run traefik on a docker swarm cluster powered by Windows Server 2019. It works while using docker network create and docker service create commands directly. But a seemingly identical compose file does not work. Any help is appreciated. PowerShell commands: # create network docker network create proxy --driver overlay --subnet 11.0.0.0/24 --gateway 11.0.0.1 # start traefik docker service create ` --name traefik ` --constraint node.role==manager ` --publish 80:80 ` --publish 8080

docker swarm list dependencies of a service

試著忘記壹切 提交于 2020-02-04 01:30:33
问题 Let's say we have the following stack file: version: "3" services: ubuntu: image: ubuntu deploy: replicas: 2 restart_policy: condition: on-failure resources: limits: cpus: "0.1" memory: 50M entrypoint: - tail - -f - /dev/null logging: driver: "json-file" ports: - "80:80" networks: - webnet web: image: httpd ports: - "8080:8080" hostname: "apache" volumes: - "/var/run/docker.sock:/var/run/docker.sock" deploy: placement: constraints: [node.role == manager] resources: limits: memory: 32M

Docker socket crash after stack up

笑着哭i 提交于 2020-01-01 12:37:10
问题 I trying to deploy docker stack, that includes my development environment. But in random cases I have next error: > failed to create service < service_name >: Cannot connect to the > Docker daemon at unix:///var/run/docker.sock. Is the docker daemon > running? Next I restart docker daemon. Sometimes it requires to kill docker processes and shims. I deleting old stack and build again. Some times docker successfully finishes build, but socket crashes on the starting stage. Also all containers

How to change the service name generated by Docker stack in docker-compose

给你一囗甜甜゛ 提交于 2019-12-22 04:38:15
问题 When deploying a stack of this compose file using: docker stack deploy -c docker-compose.yml myapp service-name: image: service-image namelike-property: my-custom-service-name // here I would like to know the property The generated service name will be myapp_service-name I would want it to be named and referenced by my-custom-service-name 回答1: For communication between services you can use the serviceName as defined in the compose file (in your case your service name is service-name) if both

Initiate MongoDB replica set in docker swarm

依然范特西╮ 提交于 2019-12-13 04:19:11
问题 I have created two config servers with replica set name rs0 in docker-compose.yml file deployed as sudo docker stack deploy --with-registry-auth --compose-file docker-compose.yml test . version: "3.3" services: cfg1-r1: image: mongo:3.2 deploy: placement: constraints: [node.hostname == ram-ThinkPad-E470] restart_policy: condition: on-failure volumes: - /opt/mongoshard/tmp:/var/lib/mongodb - /opt/mongoshard/mongod.conf:/etc/mongod.conf networks: - mongoshard command: ["mongod", "--configsvr",

docker stack deploy from compose file - all services one node?

∥☆過路亽.° 提交于 2019-12-12 04:57:30
问题 I have a docker-compose file with 10 services (containers). I have it configured one instance of each server. When I execute the stack deploy, all 10 services go to one node (manager). I trust that adding a second instance of a service will distribute it, but I want my 10 unique services distributed. 回答1: If you are using a private registry its important to share the login and credentials with the worker nodes by using docker stack deploy --with-registry-auth 回答2: Don't have the reputation to