# New docker image retention

**URL:** https://discuss.tryton.org/t/new-docker-image-retention/3119
**Category:** Organisation
**Created:** [August 13, 2020, 3:37pm UTC](https://discuss.tryton.org/t/new-docker-image-retention/3119 "2020-08-13T15:37:24Z")
**Posts on this page:** 10
**Page:** 1

<div class="post-metadata">

### Author: ![ced](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/ced/32/1237_2.png) [@ced](https://discuss.tryton.org/u/ced)
#### Post date: [August 13, 2020, 3:37pm UTC](https://discuss.tryton.org/t/new-docker-image-retention/3119/1 "2020-08-13T15:37:24Z")

</div>

Docker is going to introduce a [new policy for free account](https://www.docker.com/pricing/retentionfaq). 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](http://downloads.tryton.org)? If yes do anyone know how to do that?

---

<div class="post-metadata">

### Author: ![pokoli](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/pokoli/32/22_2.png) [@pokoli](https://discuss.tryton.org/u/pokoli)
#### Post date: [August 13, 2020, 3:51pm UTC](https://discuss.tryton.org/t/new-docker-image-retention/3119/2 "2020-08-13T15:51:56Z")

</div>

Maybe we should request the foundation to create an account for docker and pay the [pro plan to have unlimited retention policy](https://www.docker.com/pricing).

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.

---

<div class="post-metadata">

### Author: ![nicoe](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/nicoe/32/2880_2.png) [@nicoe](https://discuss.tryton.org/u/nicoe)
#### Post date: [August 13, 2020, 4:40pm UTC](https://discuss.tryton.org/t/new-docker-image-retention/3119/3 "2020-08-13T16:40:37Z")

</div>

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).

---

<div class="post-metadata">

### Author: ![dave](https://discuss-cdn.tryton.org/letter_avatar_proxy/v4/letter/d/ee7513/32.png) [@dave](https://discuss.tryton.org/u/dave)
#### Post date: [August 13, 2020, 5:54pm UTC](https://discuss.tryton.org/t/new-docker-image-retention/3119/4 "2020-08-13T17:54:29Z")

</div>

> [@ced](#):
>
> If yes do anyone know how to do that?

If you want to do this you need to run a [docker registry](https://docs.docker.com/registry/). There is a [docker image](https://hub.docker.com/_/registry) 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](https://gist.github.com/coolersport/8f576615c786ef86c8d90701c9762743)

---

<div class="post-metadata">

### Author: ![dave](https://discuss-cdn.tryton.org/letter_avatar_proxy/v4/letter/d/ee7513/32.png) [@dave](https://discuss.tryton.org/u/dave)
#### Post date: [August 14, 2020, 9:23am UTC](https://discuss.tryton.org/t/new-docker-image-retention/3119/5 "2020-08-14T09:23:33Z")

</div>

> [@ced](#):
>
> I’m wondering if we should make a “backup” of those images and upload them on [downloads.tryton.org](http://downloads.tryton.org)? If yes do anyone know how to do that?

If you are not bothered about being able to pull and push them directly, and you want to archive them to [downloads.tryton.org](http://downloads.tryton.org) you just need to use the [`docker save`](https://docs.docker.com/engine/reference/commandline/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`](https://docs.docker.com/engine/reference/commandline/load/) command:

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

```

---

<div class="post-metadata">

### Author: ![jonl](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/jonl/32/1126_2.png) [@jonl](https://discuss.tryton.org/u/jonl)
#### Post date: [August 18, 2020, 12:37am UTC](https://discuss.tryton.org/t/new-docker-image-retention/3119/6 "2020-08-18T00:37:42Z")

</div>

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

---

<div class="post-metadata">

### Author: ![pokoli](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/pokoli/32/22_2.png) [@pokoli](https://discuss.tryton.org/u/pokoli)
#### Post date: [August 18, 2020, 1:51pm UTC](https://discuss.tryton.org/t/new-docker-image-retention/3119/7 "2020-08-18T13:51:09Z")

</div>

We store the [DockerFile of older versions on the tryton-docker respository](https://hg.tryton.org/tryton-docker/file/tip/4.4/Dockerfile) 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.

---

<div class="post-metadata">

### Author: ![ced](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/ced/32/1237_2.png) [@ced](https://discuss.tryton.org/u/ced)
#### Post date: [August 18, 2020, 1:53pm UTC](https://discuss.tryton.org/t/new-docker-image-retention/3119/8 "2020-08-18T13:53:19Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![dave](https://discuss-cdn.tryton.org/letter_avatar_proxy/v4/letter/d/ee7513/32.png) [@dave](https://discuss.tryton.org/u/dave)
#### Post date: [August 18, 2020, 3:16pm UTC](https://discuss.tryton.org/t/new-docker-image-retention/3119/9 "2020-08-18T15:16:45Z")

</div>

> [@ced](#):
>
> No you can not be sure to build the same exact image because:
> 
> - base image may be different

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.

---

<div class="post-metadata">

### Author: ![ced](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/ced/32/1237_2.png) [@ced](https://discuss.tryton.org/u/ced)
#### Post date: [September 1, 2020, 8:26am UTC](https://discuss.tryton.org/t/new-docker-image-retention/3119/10 "2020-09-01T08:26:57Z")

</div>

I have uploaded old images on [https://downloads.tryton.org/docker/](https://downloads.tryton.org/docker/)
