Closed josepjaume closed 6 years ago
Actually @josepjaume I think this was a false alarm, I completely removed the image to make sure that I download it fresh and now running docker run --rm -it decidim/decidim:latest-dev bash -c "bundle --version"
or docker run --rm -t decidim/decidim:latest-dev bash -c "ls -la /tmp"
works as expected.
Unless you manually pushed a fixed image or something, it seemed like a false alarm, sorry...
Nope, I didn't! Anyway, I've seen this method used in the past - It might be useful in some situations. Should we maybe merge this?
I've used the --no-cache
option to docker build
before. Is it equivalent to what we're doing here?
Regarding the --pull
option, seems like a good thing to do!
Well, not exactly. The --cache
will build the image from scratch every time, while this way we can choose when to increment the number to skip the cache. Having docker cache intermediate steps is good in the majority of situations, except when you want to run them again (newer versions, etc). But I see how it looks a bit weird... What to do? xD
Ah ah, I see how this env variable works now. I thought it was a boolean, but it's a counter!
Not sure what to do either, but it's nice to discover this trick :)
Let's close this, as there's no aparent benefit.
This introduces a
FORCE_REBUILD_VERSION
dummy echo to force rebuilding from that step on when we might need it.It also ensures the docker image is build using
--pull
so we get the latest base ruby image in each rebuild.