Skip to content

Files

Latest commit

 

History

History
26 lines (17 loc) · 929 Bytes

DL3017.md

File metadata and controls

26 lines (17 loc) · 929 Bytes

Pattern: Use of apk upgrade

Issue: -

Description

You should avoid RUN apk upgrade as many of the “essential” packages from the parent images won’t upgrade inside an unprivileged container. If a package contained in the parent image is out-of-date, you should contact its maintainers. If you know there’s a particular package, foo, that needs to be updated, use apt-get install -y foo to update automatically.

Example of incorrect code:

RUN apk update \
    && apk upgrade \
    && apk add curl

Example of correct code:

 RUN apt-get update && apt-get install -y curl

Further Reading