docker-compose


why does docker-compose build trigger a rebuild when nothing changed


I pasted below my docker-compose.yml file. I expect the first time when I run docker-compose build, it will indeed build the images for my 2 Rails microservices. But if I run docker-compose up/docker-compose stop and then re-run docker-compose build, without modifying any code in the source folders and without modifying the docker-compose or the Dockerfiles, it actually rebuilds the image. I can see in the terminal window how it perform the apt-get commands and runs bundler. Why is that? Shouldn't it use the cached images? Perhaps it detects file changes in the log folder?
version: '2'
services:
nginx:
image: jwilder/nginx-proxy:latest
ports:
- '80:80'
volumes:
- '/var/run/docker.sock:/tmp/docker.sock'
api:
build: ./API
image: XXX/XXX:api-v0.1
volumes:
- ./API:/usr/src/app
depends_on:
- docker-mysql
- docker-redis
- api-avs
env_file:
- './API/.env'
environment:
VIRTUAL_HOST: api.dev
expose:
- '8080'
api-avs:
build: ./AVS
image: XXX/XXX:api-avs-v0.1
volumes:
- ./AVS:/usr/src/app
ports:
- '5000:5000'
depends_on:
- docker-mysql
env_file:
- './AVS/.env'
docker-mysql:
image: mysql:5.6
env_file:
- './API/.env'
volumes:
- './mysql-data:/var/lib/mysql'
docker-redis:
image: redis:3.2
volumes:
- './redis-data:/data'

Related Links

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
Race conditions after changing names in docker-compose.yml
Docker compose - image not found
How to work out the hostname that compose gives containers?

Categories

HOME
oauth-2.0
qlikview
oop
postsharp
boxplot
sms
snmp
aggregate-functions
python-3.4
digital
core-data
virtualenv
javascript-debugger
repeater
webseal
powerpivot
react-jsx
connectiq
infinite-loop
aws-iot
android-xml
akavache
workflow-foundation
libxml2
angular2-changedetection
hierarchical-data
git-submodules
foxpro
ios-autolayout
visual-studio-debugging
log4net-configuration
visual-prolog
microstrategy
cache-control
multi-user
stencyl
jibx
rexx
taleo
niagara-ax
line-endings
opos
react.rb
g77
django-tables2
multivalue
openpgp.js
sp
r-commander
android-vectordrawable
sharing
easy-thumbnails
eclipse-mars
x12
falcon
diameter-protocol
sbt-proguard
database-administration
usps
periodic-processing
factorization
ewam
matlab-engine
android-facebook
javapackager
database-project
notice
log4cxx
openhab
autoscaling
tooltwist
pagecontrol
playn
pdcurses
clearquest
valdr-bean-validation
pymol
chrome-mobile
backtrace
diffmerge
indic
parallel-port
step
facebook-likebox
mysql-error-1146
raddatepicker
violation
azure-pack
playing-cards
typography
stringstream
leap-year
asp.net-4.0
pageload
system.transactions
inflate
m3u
blackberry-eclipse-plugin
winrt-async
scriptmanager
execjs
code-golf
konsole

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