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'
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?