Skip to content

Conversation

Rotzbua
Copy link
Contributor

@Rotzbua Rotzbua commented Aug 30, 2019

  • Base image should be up to date.

  • "Avoid RUN apt-get upgrade and dist-upgrade, as many of the “essential” packages from the parent images cannot upgrade inside an unprivileged container. "

Reference:
https://docs.docker.com/develop/develop-images/dockerfile_best-practices/#run

@kaspar030
Copy link
Contributor

while this is "best practice", I'm not sure we actually should stop updating the base image. "ubuntu:bionic" is still at its initial version, right?

@Rotzbua
Copy link
Contributor Author

Rotzbua commented Sep 23, 2019

We should not update an underling layer, because it simply costs resources in build time and storage. The base image should be always up to date.
The dockerfile uses the official docker image from ubuntu, which is regularly updated. Nevertheless docker use caches so docker may use an older local caches ubuntu base image. To avoid this behavior simply add --pull flag to ensure latest available version.

@Rotzbua
Copy link
Contributor Author

Rotzbua commented Sep 23, 2019

Should I add the --pull flag to travis script and:

# 2. # docker build -t riotbuild .

?

@kaspar030
Copy link
Contributor

The dockerfile uses the official docker image from ubuntu, which is regularly updated.

Do you have a reference for this?

Docker Hub using old versions of the parent image might be the reason that every dist-upgrade actually upgrades a lot.

@Rotzbua
Copy link
Contributor Author

Rotzbua commented Sep 23, 2019

You mean?
https://docs.docker.com/docker-hub/official_images/

Ubuntu image:
https://hub.docker.com/_/ubuntu?tab=tags

bionic25.48 MB
Last updated5 days agobydoijanky

@kaspar030
Copy link
Contributor

Yes, thanks! I also found this: https://anchore.com/look-often-docker-images-updated/
That's seems fine.

@kaspar030
Copy link
Contributor

Should I add the --pull flag to travis script and:

Yes please!

Copy link
Contributor

@kaspar030 kaspar030 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK.

@kaspar030 kaspar030 merged commit ea042a7 into RIOT-OS:master Oct 10, 2019
@chrysn chrysn mentioned this pull request Apr 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants