docker-swarm

Docker-compose: replace “build”-based service with pre-built image in production?

久未见 提交于 2021-01-27 08:11:19
问题 Let's say we have the following docker-compose.yml : version: '3' services: db: image: "postgres" ports: - "5432:5432" environment: - POSTGRES_PASSWORD=mysecretpassword web: build: web depends_on: [ db ] ports: - "80:80" The first service, db , just runs a container with the official postgres image from Docker Hub. The second service, web , first builds a new image based on the Dockerfile in a folder also called web , then runs a container with that image. While developing, we now can

Docker-compose: replace “build”-based service with pre-built image in production?

谁都会走 提交于 2021-01-27 08:05:04
问题 Let's say we have the following docker-compose.yml : version: '3' services: db: image: "postgres" ports: - "5432:5432" environment: - POSTGRES_PASSWORD=mysecretpassword web: build: web depends_on: [ db ] ports: - "80:80" The first service, db , just runs a container with the official postgres image from Docker Hub. The second service, web , first builds a new image based on the Dockerfile in a folder also called web , then runs a container with that image. While developing, we now can

Docker-compose: replace “build”-based service with pre-built image in production?

三世轮回 提交于 2021-01-27 08:01:08
问题 Let's say we have the following docker-compose.yml : version: '3' services: db: image: "postgres" ports: - "5432:5432" environment: - POSTGRES_PASSWORD=mysecretpassword web: build: web depends_on: [ db ] ports: - "80:80" The first service, db , just runs a container with the official postgres image from Docker Hub. The second service, web , first builds a new image based on the Dockerfile in a folder also called web , then runs a container with that image. While developing, we now can

Error response from daemon: attaching to network failed, make sure your network options are correct and check manager logs: context deadline exceeded

风格不统一 提交于 2021-01-27 07:06:10
问题 I am trying to set up docker swarm with an overlay network. I have some hosts on aws while others are laptops running Ubuntu(same as on aws). Every node has a static public IP. I have created an overlay network as: docker network create --driver=overlay --attachable test-net I have created a swarm network on one of the aws hosts. Every other node is able to join that swarm network. However when I run docker run -it --name alpine2 --network test-net alpine on any node not on aws, I get the

Docker Named Volume with targeting windows local folder

爷,独闯天下 提交于 2021-01-27 07:04:16
问题 In docker-compose file I want to create a named volume which will target local drive for test purposes. For production we will use NFS. I created the compose file as following, version: '3.3' services: test: build: . volumes: - type: volume source: data_volume target: /data networks: - network volumes: data_volume: driver: local driver_opts: o: bind type: none device: c:/data networks: network: driver: overlay attachable: true When I run the docker-compose up, I got the following error, for

connect to mysql container from another container

依然范特西╮ 提交于 2021-01-27 04:22:10
问题 I'm trying to connect to a mysql container from within another container on the same network specified by a compose file. version: "2" services: web: build: context: . dockerfile: nginx/Dockerfile ports: - "8080:80" volumes: - ./data:/srv php: build: context: . dockerfile: php-fpm/Dockerfile volumes: - ./data:/srv mysql: image: mysql environment: - MYSQL_ALLOW_EMPTY_PASSWORD=yes - MYSQL_USER=dummy_user - MYSQL_PASSWORD=12345 I'm not really sure what the connection parameters would be if I'm

Cannot ping docker container on another host using an overlay network

心已入冬 提交于 2020-12-08 03:06:49
问题 This question has been asked many many times before on all types of fora but unfortunately, none of the answers have helped me so far. I will get right to it. OS: RHEL 7.7 Maipo Docker Version: Engline/Client 18.09.7 My configuration: Host 1: IP 169.192.215.74 Host 2: IP 10.210.87.16 **On Host1:** # netstat -plntu|grep -E "4789|7946|2377" tcp6 0 0 :::2377 :::* LISTEN 3576/dockerd tcp6 0 0 :::7946 :::* LISTEN 3576/dockerd udp 0 0 0.0.0.0:4789 0.0.0.0:* - udp6 0 0 :::7946 :::* 3576/dockerd #

Cannot ping docker container on another host using an overlay network

雨燕双飞 提交于 2020-12-08 03:06:21
问题 This question has been asked many many times before on all types of fora but unfortunately, none of the answers have helped me so far. I will get right to it. OS: RHEL 7.7 Maipo Docker Version: Engline/Client 18.09.7 My configuration: Host 1: IP 169.192.215.74 Host 2: IP 10.210.87.16 **On Host1:** # netstat -plntu|grep -E "4789|7946|2377" tcp6 0 0 :::2377 :::* LISTEN 3576/dockerd tcp6 0 0 :::7946 :::* LISTEN 3576/dockerd udp 0 0 0.0.0.0:4789 0.0.0.0:* - udp6 0 0 :::7946 :::* 3576/dockerd #