docker-compose


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.

Related Links

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

Categories

HOME
drupal
postgresql
primefaces
typo3
cluster-analysis
webvr
livecharts
arguments
hiveql
crash
foreach
yacc
element
saucelabs
react-select
loss
aws-devicefarm
computation-theory
keystone
gomobile
datazen-server
lotusscript
klipfolio
ppp
android-wear-2.0
nsopenpanel
cloudformation
launchd
pypy
ipython-parallel
edirectory
vtd-xml
ng2-bootstrap
spring-oauth2
traitsui
http-proxy
ponylang
motherboard
kepserverex
stencyl
ng-lightning
compiler-warnings
colorbox
superclass
grails-2.0
jcs
fluent-nhibernate-mapping
dynatable
disassembly
google-scholar
scikit-image
papyrus
indoor-positioning-system
tinybox2
cherry-pick
hfp
android-xmlpullparser
usps
clique
cexception
dcast
instabug
videoview
dynamics-nav-2013
winforms-interop
pagecontrol
firewire
ultraedit
firebase-tools
connection-timeout
fedena
frisby.js
system.io.packaging
disabled-control
amzi-prolog
yandex-api
nvcc
netbeans-plugins
google-mirror-api
kendo-window
caroufredsel
playing-cards
qmainwindow
cocotron
nx
ftpwebrequest
phone-state-listener
yii-components
quit
expresso-store
doxia
webpage-screenshot
php-gettext
nsscrollview
animationdrawable
virtual-printer
parallel-python
youtube.net-api
sessiontracking
cryptolicensing
azure-appfabric
silverlight-2.0
mysql-pconnect
manuals
cross-cutting-concerns

Resources

Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization
Database Dev&Adm
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App