Skip to content

apt: remove not allowed dist-upgrade#81

Merged
kaspar030 merged 1 commit intoRIOT-OS:masterfrom
Rotzbua:patch-2
Oct 10, 2019
Merged

apt: remove not allowed dist-upgrade#81
kaspar030 merged 1 commit intoRIOT-OS:masterfrom
Rotzbua:patch-2

Conversation

@Rotzbua
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
Contributor Author

Rotzbua commented Sep 23, 2019

@kaspar030
Copy link
Copy Markdown
Contributor

@kaspar030
Copy link
Copy Markdown
Contributor

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

Yes please!

Copy link
Copy Markdown
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