Code Monkey home page Code Monkey logo

docker-invalidate-repro's Introduction

docker cache invalidate repro

git clone https://github.com/matti/docker-invalidate-repro
cd docker-invalidate-repro
docker-compose pull
docker-compose build

everything should be cached, but it's not:

Building context
Step 1/6 : FROM alpine:3.11
 ---> e7d92cdc71fe
Step 2/6 : RUN apk add --no-cache   bash
 ---> Using cache
 ---> 015ba239eaab
Step 3/6 : WORKDIR /folder
 ---> Using cache
 ---> 268b719c447c
Step 4/6 : COPY folder .
 ---> 2d8ff607ee20
Step 5/6 : RUN ls -la
 ---> Running in 7f10127a5ea9
total 12
drwxr-xr-x    1 root     root          4096 Feb 13 13:30 .
drwxr-xr-x    1 root     root          4096 Feb 13 13:30 ..
-rw-r--r--    1 root     root             9 Feb 13 13:30 file
Removing intermediate container 7f10127a5ea9

try with own account:

export CACHE_IMAGE=user/image
export IMAGE=user/image
docker-compose build
...

this works, but only on your own machine. if you push the image and somebody else uses it, caches are invalidated at the COPY

docker-invalidate-repro's People

Contributors

matti avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.