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

JHipster Cassandra Docker Build
Defining project name inside docker-compose configuration
Docker-compose named mounted volume
cannot ping linked docker container service
How to do variable substitution in env_file?
How to create stack in tutum with docker-compose.yml file?
ecs-cli docker compose version
dynamic link update in docker-compose
How to start arbitrarily many identical containers with docker-compose?
How to stop docker-compose run command
Unable to run sensu check in a docker-compose context
Should I use docker-compose start or docker-compose up -d
Docker Compose automatically setting links
docker compose volumes not contains files
Inheritance or nesting with docker compose
Reading docker-compose environment variables in application code

Categories

HOME
sip
casting
dynamic
spotfire
nltk
spss
pandoc
css-selectors
symfony-3.2
gnuradio
python-3.4
handlebars.js
pip
google-api-oauth
gcloud
osclass
watson-dialog
pylint
jq
uipath
waterfall
inspec
workflow-foundation
azure-table-storage
spring-data-gemfire
ios9
storefront
scene7
ports
ansible-inventory
pymunk
outlook-2010
stochastic-process
gem-fury
linkurious
jvisualvm
pyexcel
libzip
gridgain
azure-data-catalog
xmldom
nao-robot
r-commander
selection-sort
codesniffer
iban
ios-keyboard-extension
pyautogui
nls
distcc
virtualenvwrapper
android-xmlpullparser
bytearray
db2-zos
nd4j
music-player
newlib
traminer
pagecontrol
page-refresh
teamwork
tinymce-plugins
chrome-mobile
qxorm
launcher
go-gin
breeze-sharp
vundle
tigase
parsefloat
windows-search
livescript
dotcmis
rails-migrations
winrun4j
sqldatasource
slimscroll
dayofweek
internet-radio
html5-filesystem
imaplib
infomaker
android-library
mosix
dd4t
gmail-imap
auctex
netbiscuits
databus
flatten
bash4
scsf
utm
openwrap
file-processing
moss2007-security
activescaffold
google-local-search
httpbrowsercapabilities

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