-
Notifications
You must be signed in to change notification settings - Fork 465
DL3018
Tanmay Pereira Naik edited this page Mar 8, 2024
·
5 revisions
FROM alpine:3.7
RUN apk --no-cache add foo
FROM alpine:3.7
RUN apk --no-cache add foo=~1.2.3
FROM alpine:3.7
RUN apk --no-cache add foo=1.2.3
Note: Pinning exact versions can cause future builds to suddenly fail if that version is no longer available. Use with caution.
Available versions in apk can search on https://pkgs.alpinelinux.org
https://docs.docker.com/develop/develop-images/instructions/#run
Version pinning forces the build to retrieve a limited range of versions, or an exact particular version, regardless of what’s in the cache. This technique can also reduce failures due to unanticipated changes in required packages.