Mongo replica node with docker

I have setup a Mongo Primary node with docker using docker image https://hub.docker.com/_/mongo/. Now I wish to add replica node in my current setup using docker only. Can anybody help me with this?

docker-compose – database migrations and other pre/post scripts

I have a sample django app that I am trying to get up and running using docker. docker-compose up brings up the web, db and other containers along with links between them. But there are pre and post scripts that might need to be run.. example of pre-scripts in my scenario: git pip docker docker-compose […]

Virtualbox inside Docker

I’m trying to get VirtualBox to run inside of Docker. I’m using this: https://registry.hub.docker.com/u/jess/virtualbox/dockerfile/. When I run the command: sudo docker run -d \ -v /tmp/.X11-unix:/tmp/.X11-unix \ -e DISPLAY=unix$DISPLAY \ –privileged \ –name virtualbox \ jess/virtualbox It adds virtualbox inside a container. When I run sudo docker start container_id, it echoes back the container_id but […]

Docker container isolation, does it care about underlying Linux OS?

If I run Docker Engine and the same container on a set of different Linux distributions, will the container run in the same way? I am asking because in many cases applications depend on a specific Linux distribution for some resources, such as fonts. If my application running inside a Docker container depends on a […]

How do I filter docker swarm nodes by label?

I’m running docker 1.12.1 and can’t get node filtering by label to work. I first add the “test” label: $ docker node update –label-add test mr-host mr-host When I attempt to filter by it, no nodes are shown: $ docker node ls –filter label=test ID HOSTNAME STATUS AVAILABILITY MANAGER STATUS Filtering by other criteria such […]

Nginx behind Traefik Docker Swarm mode real ip

I’m using Traefik as a reverse proxy in front of nginx service on a docker swarm environment. Here’s my docker-stack.yml: traefik: image: traefik command: -c /dev/null –web –docker –docker.swarmmode –docker.watch –docker.domain=domain –logLevel=DEBUG ports: – “8080:8080” – “80:80” – “443:443” networks: – app volumes: – /var/run/docker.sock:/var/run/docker.sock deploy: placement: constraints: [node.role == manager] nginx: image: nginx networks: […]

How to change docker installation directory in centos 7 with docker 1.13 version

I have enclosed the docker details below, $ docker info Containers: 3 Running: 3 Paused: 0 Stopped: 0 Images: 26 Server Version: 1.13.0 Storage Driver: overlay Backing Filesystem: xfs Supports d_type: false Logging Driver: json-file Cgroup Driver: cgroupfs Plugins: Volume: local Network: bridge host macvlan null overlay Swarm: inactive Runtimes: runc Default Runtime: runc Init […]

Docker for Windows: cannot assign requested address

How can I setup a multi-host running Docker 1.12 on Hyper-V? I can easily assign a 127.x.x.x ip, but I would like to assign e.g. 10.240.0.x. This is my docker-compose.yaml: version: ‘2’ services: nginx: image: nginx:lastest ports: – “127.0.0.100:80:80” If I try to assign 10.240.0.100 I get this error: Error starting userland proxy: listen tcp […]

Use docker-swarm with dokku

The swarm document here https://docs.docker.com/swarm/ tell us that Because Docker Swarm serves the standard Docker API, any tool that already communicates with a Docker daemon can use Swarm to transparently scale to multiple hosts. Supported tools include, but are not limited to, the following: Dokku Docker Compose Krane Jenkins So how can I use Dokku […]

Not able to connect to wurstmeister/kafka

I am running wurstmeister/kafka in a ubuntu 14.04 LTS machine. Kafka container is running fine. However I am not able to connect my microservice to this container. Kafka docker-compose.yml: version: ‘2’ services: zookeeper: image: user1/zookeeper:3.4.9 ports: – “2181:2181” kafka: image: my-kafka ports: – “9092:9092” hostname: kafka-01 environment: KAFKA_ADVERTISED_PORT: 9092 KAFKA_ADVERTISED_HOST_NAME: “kafka-01” KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181 KAFKA_CREATE_TOPICS: “topic1:1:1,topic2:1:1” […]

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