Build multiple images with Docker Compose?
I have a repository which builds three different images: powerpy-base powerpy-web powerpy-worker Both powerpy-web and powerpy-worker inherit from powerpy-base using the FROM keyword in their Dockerfile. I'm using Docker Compose in the project to run a Redis and RabbitMQ container. Is there a way for me to tell Docker Compose that I'd like to build the base image first and then the web and worker images?
You can use depends_on to enforce an order, however that order will also be applied during "runtime" (docker-compose up), which may not be correct. If you're only using compose to build images it should be fine. You could also split it into two compose files. a docker-compose.build.yml which has depends_on for build, and a separate one for running the images as services. These is a related issue: https://github.com/docker/compose/issues/295
About run containers: It was bug before, but they fixed it since docker-compose v1.10. https://blog.docker.com/2016/02/docker-1-10/ Start linked containers in correct order when restarting daemon: This is a little thing, but if you’ve run into it you’ll know what a headache it is. If you restarted a daemon with linked containers, they sometimes failed to start up if the linked containers weren’t running yet. Engine will now attempt to start up containers in the correct order. About build: You need to build base image first.
docker compose adding nodes dynamically to nginx frontend
Docker Swarm - dependencies definition
docker-compose volume not mounted
Exposing sentry service in docker-compose file
Yesod and docker-compose logs in development mode
Docker compose to always deploy using latest image
JHipster - Doubts in the development using Microservices Architecture
Gogs + Drone getsockopt: connection refused
Concourse result keeps loading
Docker-compose: AttributeError: 'module' object has no attribute 'ssl'
scaling a service with docker compose
Docker Compose apparently ignores COMPOSE_FILE
Where does Docker install gems on a mac
What is the difference between docker-machine and docker-compose?
Docker Compose port issue. Cannot launch docker project on localhost
Name an image built from running a docker-compose file