Reputation: 48439
Learning Docker here... I have a simple question. I can't figure out the following.
Today, Alice build and push her custom image to Docker Hub:
FROM alpine
RUN apk add --update --no-cache mysoftware
When Alice build the image, mysoftware
(say version 1.0
) will be added to the image.
Next week, Bob pull the image. In the meanwhile, mysoftware
has bumped to 1.1
version. Does bob gets the updated version of mysoftware
... or the apk add mysoftware
command is "freezed" at the time that Alice build/push the image?
Upvotes: 0
Views: 142
Reputation: 22710
When you build your image docker is using sha256 code of base image, so even if tag of your base image (alpine:latest
in your case) will point on different image - your container will still be using exactly the same image it was using during creation. Only docker build is creating new image, push and pull will only transfer earlier built image.
If you want to update your image you'll have to do docker build
and docker push
again
Upvotes: 2