Skip to content

Instantly share code, notes, and snippets.

@akatz
Last active April 20, 2016 20:30
Show Gist options
  • Save akatz/d5f4d40a66e6da4477dff6447273c218 to your computer and use it in GitHub Desktop.
Save akatz/d5f4d40a66e6da4477dff6447273c218 to your computer and use it in GitHub Desktop.
Docker cache issue reported here: https://github.com/docker/compose/issues/883
version: '2'
services:
web:
build: .
FROM alpine:3.3
COPY Gemfile /usr
docker@default:/mnt/sda1/tmp/tmp$ docker-compose build web
Building web
Step 1 : FROM alpine:3.3
---> 90239124c352
Step 2 : COPY Gemfile /usr
---> fa6a158031fc
Removing intermediate container b4011178b29b
Successfully built fa6a158031fc
docker@default:/mnt/sda1/tmp/tmp$ docker-compose build web
Building web
Step 1 : FROM alpine:3.3
---> 90239124c352
Step 2 : COPY Gemfile /usr
---> Using cache
---> fa6a158031fc
Successfully built fa6a158031fc
docker@default:/mnt/sda1/tmp/tmp$ docker-compose build web
Building web
Step 1 : FROM alpine:3.3
---> 90239124c352
Step 2 : COPY Gemfile /usr
---> Using cache
---> fa6a158031fc
Successfully built fa6a158031fc
docker@default:/mnt/sda1/tmp/tmp$ docker build -t foo .
Sending build context to Docker daemon 3.584 kB
Step 1 : FROM alpine:3.3
---> 90239124c352
Step 2 : COPY Gemfile /usr
---> Using cache
---> f03db7e3fc15
Successfully built f03db7e3fc15
docker@default:/mnt/sda1/tmp/tmp$ docker build -t foo .
Sending build context to Docker daemon 3.584 kB
Step 1 : FROM alpine:3.3
---> 90239124c352
Step 2 : COPY Gemfile /usr
---> Using cache
---> f03db7e3fc15
Successfully built f03db7e3fc15
docker@default:/mnt/sda1/tmp/tmp$ docker --version
Docker version 1.11.0, build 4dc5990
docker@default:/mnt/sda1/tmp/tmp$ docker-compose --version
docker-compose version 1.7.0, build 0d7bf73
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment