New docker image retention

Docker is going to introduce a new policy for free account. This means that Tryton images will be deleted if there are not pulled or pushed for 6 months.
So there is no problem with supported series as we push an update every week. The question is more about past series which will be removed starting the 1st November 2020.
I’m wondering if we should make a “backup” of those images and upload them on downloads.tryton.org? If yes do anyone know how to do that?

Maybe we should request the foundation to create an account for docker and pay the pro plan to have unlimited retention policy.

I think the price is afordable and it will make life easier for us as we do not have to take care of expired images.

Is is an issue that unsupported images are not available anymore ?
It will push people to update more often to a supported version (LTS is 5 years long which should be more than enough).

1 Like

If you want to do this you need to run a docker registry. There is a docker image you can use.

Once the registry is up and running you would tag the images and include the server address in the tag, and then push / pull them as normal. Something like this:

# assuming the registry is accessible at docker.tryton.org
docker pull tryton/tryton:5.6
docker tag tryton/tryton:5.6 docker.tryton.org/tryton:5.6

# then push and pull to the registry
docker push docker.tryton.org/tryton:5.6
docker pull docker.tryton.org/tryton:5.6

Read / write access can be setup to allow everyone to read from the registry, and only some users to write to it: https://gist.github.com/coolersport/8f576615c786ef86c8d90701c9762743

1 Like

If you are not bothered about being able to pull and push them directly, and you want to archive them to downloads.tryton.org you just need to use the docker save command:

docker save tryton/tryton:5.6 | gzip > docker-image-5.6.0.tar.gz

They can be loaded by people by using the docker load command:

curl https://downloads.tryton.org/5.6/docker-image-5.6.0.tar.gz | docker load
2 Likes

I am in favor of saving these backups. I think they will be valuable to the Tryton community.

1 Like

We store the DockerFile of older versions on the tryton-docker respository so probably this will be enougth to rebuild the same exact image.

So I’m wondering if storing the binary image will have any benefit.

No you can not be sure to build the same exact image because:

  • base image may be different
  • the docker file make an apt-update of the system
  • pip install latest version of libraries

So docker build are not reproducible.

And it is worth noting that the docker save command saves all the parent images in the tar file that it creates, which means it will include the base image.

I have uploaded old images on https://downloads.tryton.org/docker/

1 Like