Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dockerfile: add ALPINE_VERSION build-arg #3896

Merged
merged 1 commit into from
Dec 4, 2022

Conversation

thaJeztah
Copy link
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
Member Author

@crazy-max PTAL

@codecov-commenter
Copy link

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           

Dockerfile Outdated
ARG XX_VERSION=1.1.1
ARG GOVERSIONINFO_VERSION=v1.3.0
ARG GOTESTSUM_VERSION=v1.8.2
ARG BUILDX_VERSION=0.9.0

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
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
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
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
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.

None yet

3 participants