Communication between multiple docker-compose projects

You just need to make sure that the containers you want to talk to each other are on the same network. Networks are a first-class docker construct, and not specific to compose. # front/docker-compose.yml version: ‘2’ services: front: … networks: – some-net networks: some-net: driver: bridge … # api/docker-compose.yml version: ‘2’ services: api: … networks: … Read more

Docker Compose wait for container X before starting Y

Finally found a solution with a docker-compose method. Since docker-compose file format 2.1 you can define healthchecks. I did it in a example project you need to install at least docker 1.12.0+. I also needed to extend the rabbitmq-management Dockerfile, because curl isn’t installed on the official image. Now I test if the management page … Read more

How to use local docker images with Minikube?

As the handbook describes, you can reuse the Docker daemon from Minikube with eval $(minikube docker-env). So to use an image without uploading it, you can follow these steps: Set the environment variables with eval $(minikube docker-env) Build the image with the Docker daemon of Minikube (eg docker build -t my-image .) Set the image … Read more

What’s the difference between Docker Compose vs. Dockerfile

Dockerfile A Dockerfile is a simple text file that contains the commands a user could call to assemble an image. Example, Dockerfile FROM ubuntu:latest MAINTAINER john doe RUN apt-get update RUN apt-get install -y python python-pip wget RUN pip install Flask ADD hello.py /home/hello.py WORKDIR /home Docker Compose Docker Compose is a tool for defining … Read more

Docker Compose – How to execute multiple commands?

Figured it out, use bash -c. Example: command: bash -c “python manage.py migrate && python manage.py runserver 0.0.0.0:8000” Same example in multilines: command: > bash -c “python manage.py migrate && python manage.py runserver 0.0.0.0:8000″ Or: command: bash -c ” python manage.py migrate && python manage.py runserver 0.0.0.0:8000 “