[systemd-devel] Updating existing docker image via machinectl

Lennart Poettering lennart at poettering.net
Fri Feb 20 04:15:32 PST 2015


On Fri, 20.02.15 12:06, Peter Paule (systemd-devel at fedux.org) wrote:

> Hi,
> 
> what needs to be done to update an existing docker image? Pulling it again
> "fails" with "Image '<name>' already exists".
> 
>   sudo machinectl pull-dkr maxmeyer/test-server --dkr-index-url
> https://index.docker.io --verify=no
>   Enqueued transfer job 1. Press C-c to continue download in background.
>   Image 'test-server' already exists
> 
> @Lennart
> Are you going to implement such a "function" or do we need to remove and
> re-pull that image?

Well, we download the layers of the image, make them read-only
subvolumes, and then make a writable snapshot of the last one at the
end, which you can use. The name of the writable snapshot you can
either specify on the command line after the image name, or it is
derived from the image name automatically, if you don't specify it.

If you invoke pull-dkr again, you can remove and replace the writable
snapshot with "--force", or you can simply give it a new name by
specifying it at the end of the command line.

dkr doesn't know the concept of updating containers that have already
been written to. Hence this logic.

Hope that makes sense?

Lennart

-- 
Lennart Poettering, Red Hat


More information about the systemd-devel mailing list