Tag: docker swarm

Can not connect nodes to docker swarm master (using zookeeper)

I am building my docker swarm cluster in a sandbox. I have 1 zookeeper on a machine for discovery, 1 swarm master and 2 swarm nodes. I try to connect them but when I try to run my docker run commands on the swarm master, it does not distribute the work to the nodes. Also […]

Can't pull image from docker registry when docker is pointing to a swarm

I’m having an issue with google container registry and dockerhub where docker pull returns the following errors. gcr Error: Status 403 trying to pull repository PROJECT_ID/IMAGE_NAME: “Unable to access the repository: PROJECT_ID/IMAGE_NAME; please verify that it exists and you have permission to access it (no valid credential was supplied).” dockerhub Using default tag: latest test-node0: […]

Docker Swarm Distribute Build Image

Situation: I have a docker swarm with two agents. The docker swarm main daemon runs on my manager host (docker-machine example setup) with –strategy random option. Steps: I build a new docker image using the docker swarm manager connection docker -H tcp://$(docker-machine ip manager):3376 build -t test123 . I startup multiple containers using the manager […]

Docker Swarm – strategy doesn't seem to have any effect

I have provisioned a swarm master and swarm nodes with Docker Machine (as described here). Everything is working fine; all the machines are created and running, they have all been discovered and accepts containers. The output from ‘docker-machine ls’ is: $ docker-machine ls NAME ACTIVE DRIVER STATE URL SWARM DOCKER ERRORS default – virtualbox Stopped […]

Is docker swarm manager part of the swarm cluster?

I don’t quite understand why the official documents are using so many machines to create a swarm cluster. Is it possible to hv consul and swarm manager in the same machine ? Also, is swarm manager part of the cluster ? If, say, I create an overlay network, is swarm manager host part of that […]

docker compose with swarm and spring boot, cannot connect to database on different node

This is my docker-compose.yml file: version: ‘2’ services: app: image: pedramrn/webapp:0.1.4 expose: – 8080 networks: – main working_dir: /src restart: never depends_on: – db-postgresql links: – db-postgresql lb: image: dockercloud/haproxy:1.5 depends_on: – app volumes: – /var/run/docker.sock:/var/run/docker.sock ports: – 80:80 networks: – main environment: – ADDITIONAL_SERVICES=springbootdockertemplate:app db-postgresql: image: postgres:9.5 ports: – “5432:5432” volumes: – data-postgresql:/var/lib/postgresql/data networks: […]

How can I boot a swarm of 50 machines with docker-machine?

I need to boot a bunch of ec2 instances (could be virtualbox instances, doesn’t matter) as a swarm. docker-machine seems to only work for doing one at a time, and that would take hours to boot 50 machines. I would like to boot the swarm master, and then in parallel boot the 49 swarm workers. […]

Docker Swarm – Subscription to container creation

I’ve got a Swarm manager and 3 workers. I’d like to write a python script that subscribes to changes that are made with Swarm (for example, getting an alert once a container is being created and running, or getting an alert once a container is stopped). Is it possible? Thanks, Efrat

How can a container enumerate hosts available on the network?

Use case: haproxy container running with docker compose. I want to have the container discover which hosts are available in order to recreate haproxy config and reload it. I know the there will be one or more containers named server1 and server2 available. From inside the haproxy container I can query dns for server1 and […]

Reuse existed containers upon Docker service scale [swarmkit]

With docker-compose up, usually we can reuse the existed container with just docker-compose up. Question How can we achieve the same thing with docker service scale …? So, I want to reuse some data that was modified under that existed containers. Example $ docker service create –replicas=4 –name=test_loop … $ docker ps -a … STATUS […]

Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.