Skip to content

Dockerfile: add ALPINE_VERSION build-arg#3896

Merged
thaJeztah merged 1 commit intodocker:masterfrom
thaJeztah:add_alpine_version
Dec 4, 2022
Merged

Dockerfile: add ALPINE_VERSION build-arg#3896
thaJeztah merged 1 commit intodocker:masterfrom
thaJeztah:add_alpine_version

Conversation

@thaJeztah
Copy link
Copy Markdown
Member

relates to:

This allows us to pin to a specific version of Alpine, in case the golang:alpine image switches to a newer version, which may at times be incompatible, e.g. see moby/moby#44570

- A picture of a cute animal (not mandatory but encouraged)

@thaJeztah
Copy link
Copy Markdown
Member Author

@crazy-max PTAL

@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Dec 4, 2022

Codecov Report

Merging #3896 (1b0d6fc) into master (64c8976) will not change coverage.
The diff coverage is n/a.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #3896   +/-   ##
=======================================
  Coverage   59.22%   59.22%           
=======================================
  Files         287      287           
  Lines       24712    24712           
=======================================
  Hits        14635    14635           
  Misses       9192     9192           
  Partials      885      885           

Comment thread Dockerfile Outdated
FROM --platform=$BUILDPLATFORM tonistiigi/xx:${XX_VERSION} AS xx

FROM --platform=$BUILDPLATFORM golang:${GO_VERSION}-${BASE_VARIANT} AS build-base-alpine
FROM --platform=$BUILDPLATFORM golang:${GO_VERSION}-${BASE_VARIANT}${ALPINE_VERSION} AS build-base-alpine
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
FROM --platform=$BUILDPLATFORM golang:${GO_VERSION}-${BASE_VARIANT}${ALPINE_VERSION} AS build-base-alpine
FROM --platform=$BUILDPLATFORM golang:${GO_VERSION}-alpine${ALPINE_VERSION} AS build-base-alpine

BASE_VARIANT can be set to alpine here.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

oh! makes sense yes, this one is always alpine.

This allows us to pin to a specific version of Alpine, in case the
golang:alpine image switches to a newer version, which may at times
be incompatible, e.g. see moby/moby#44570

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
@thaJeztah
Copy link
Copy Markdown
Member Author

@crazy-max updated; PTAL

@thaJeztah thaJeztah merged commit 7240f70 into docker:master Dec 4, 2022
@thaJeztah thaJeztah deleted the add_alpine_version branch December 4, 2022 17:26
@thaJeztah
Copy link
Copy Markdown
Member Author

Thx!

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