Skip to content

Commit

Permalink
Merge pull request #5389 from crazy-max/revert-dockerfile-pin
Browse files Browse the repository at this point in the history
Revert "dockerfile: pin dockerfile frontend image"
  • Loading branch information
tonistiigi authored Oct 8, 2024
2 parents 04dcfaa + 6cb3aaf commit 62bda5c
Show file tree
Hide file tree
Showing 9 changed files with 24 additions and 22 deletions.
26 changes: 13 additions & 13 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# syntax=docker/dockerfile-upstream:master@sha256:df54e73548d586209f6fc6d34d61edf8277e1b9d2704aff8fe75294a17c6a29b
# syntax=docker/dockerfile-upstream:master

ARG RUNC_VERSION=v1.1.14
ARG CONTAINERD_VERSION=v1.7.22
# containerd v1.6 for integration tests
# CONTAINERD_ALT_VERSION_16 defines fallback containerd version for integration tests
ARG CONTAINERD_ALT_VERSION_16=v1.6.36
ARG REGISTRY_VERSION=v2.8.3
ARG ROOTLESSKIT_VERSION=v2.0.2
Expand All @@ -29,22 +29,22 @@ FROM minio/mc:${MINIO_MC_VERSION} AS minio-mc
# xx is a helper for cross-compilation
FROM --platform=$BUILDPLATFORM tonistiigi/xx:${XX_VERSION} AS xx

# go base image
# golatest is alias for Go base image
FROM --platform=$BUILDPLATFORM golang:${GO_VERSION}-alpine${ALPINE_VERSION} AS golatest

# gobuild is base stage for compiling go/cgo
# gobuild-base is base stage for compiling go/cgo
FROM golatest AS gobuild-base
RUN apk add --no-cache file bash clang lld musl-dev pkgconfig git make
COPY --link --from=xx / /

# delve for debug variant
# dlv builds delve for debug variant images
FROM gobuild-base AS dlv
ARG DELVE_VERSION
RUN --mount=target=/root/.cache,type=cache \
--mount=target=/go/pkg/mod,type=cache \
GOBIN=/usr/bin go install github.com/go-delve/delve/cmd/dlv@${DELVE_VERSION}

# build runc binary
# runc builds runc binary
FROM gobuild-base AS runc
WORKDIR $GOPATH/src/github.com/opencontainers/runc
ARG RUNC_VERSION
Expand All @@ -65,7 +65,7 @@ FROM gobuild-base AS buildkit-base
WORKDIR /src
ENV GOFLAGS=-mod=vendor

# scan the version/revision info
# buildkit-version builds stage with version/revision info
FROM buildkit-base AS buildkit-version
# TODO: PKG should be inferred from go modules
RUN --mount=target=. <<'EOT'
Expand All @@ -79,7 +79,7 @@ RUN --mount=target=. <<'EOT'
echo -n "${VERSION}" > /tmp/.version;
EOT

# build buildctl binary
# buildctl builds test cli binary
FROM buildkit-base AS buildctl
ENV CGO_ENABLED=0
ARG TARGETPLATFORM
Expand All @@ -93,7 +93,7 @@ RUN --mount=target=. --mount=target=/root/.cache,type=cache \
if [ "$(xx-info os)" = "linux" ]; then /usr/bin/buildctl --version; fi
EOT

# build buildkitd binary
# buildkitd builds daemon binary
FROM buildkit-base AS buildkitd
# BUILDKITD_TAGS defines additional Go build tags for compiling buildkitd
ARG BUILDKITD_TAGS
Expand Down Expand Up @@ -135,7 +135,7 @@ RUN --mount=target=. --mount=target=/root/.cache,type=cache \
fi
EOT

# build dnsname CNI plugin for testing
# dnsname builds dnsname CNI plugin for testing
FROM gobuild-base AS dnsname
WORKDIR /go/src/github.com/containers/dnsname
ARG DNSNAME_VERSION
Expand Down Expand Up @@ -186,7 +186,7 @@ COPY --link --from=buildkitd /usr/bin/buildkitd /
COPY --link --from=buildctl /usr/bin/buildctl /

FROM binaries-$TARGETOS AS binaries
# enable scanning for this stage
# BUILDKIT_SBOM_SCAN_STAGE enables SBOM scanning for this stage
ARG BUILDKIT_SBOM_SCAN_STAGE=true

FROM --platform=$BUILDPLATFORM alpine:${ALPINE_VERSION} AS releaser
Expand Down Expand Up @@ -230,7 +230,7 @@ RUN --mount=target=/root/.cache,type=cache <<EOT
fi
EOT

# containerd v1.6 for integration tests
# containerd-alt-16 builds containerd v1.6 for integration tests
FROM gobuild-base AS containerd-alt-16
WORKDIR /go/src/github.com/containerd/containerd
ARG CONTAINERD_ALT_VERSION_16
Expand Down Expand Up @@ -418,7 +418,7 @@ ENV BUILDKIT_RUN_NETWORK_INTEGRATION_TESTS=1 BUILDKIT_CNI_INIT_LOCK_PATH=/run/bu
FROM integration-tests AS dev-env
VOLUME /var/lib/buildkit

# Rootless mode.
# rootless builds a rootless variant of buildkitd image
FROM alpine:${ALPINE_VERSION} AS rootless
RUN apk add --no-cache fuse3 fuse-overlayfs git openssh pigz shadow-uidmap xz
RUN adduser -D -u 1000 user \
Expand Down
2 changes: 1 addition & 1 deletion frontend/dockerfile/cmd/dockerfile-frontend/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# syntax=docker/dockerfile-upstream:master@sha256:df54e73548d586209f6fc6d34d61edf8277e1b9d2704aff8fe75294a17c6a29b
# syntax=docker/dockerfile-upstream:master

ARG GO_VERSION=1.22
ARG ALPINE_VERSION=3.20
Expand Down
2 changes: 1 addition & 1 deletion hack/dockerfiles/archutil.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# syntax=docker/dockerfile-upstream:master@sha256:df54e73548d586209f6fc6d34d61edf8277e1b9d2704aff8fe75294a17c6a29b
# syntax=docker/dockerfile-upstream:master
# check=error=true

ARG GO_VERSION=1.22
Expand Down
2 changes: 1 addition & 1 deletion hack/dockerfiles/authors.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# syntax=docker/dockerfile-upstream:master@sha256:df54e73548d586209f6fc6d34d61edf8277e1b9d2704aff8fe75294a17c6a29b
# syntax=docker/dockerfile-upstream:master

ARG ALPINE_VERSION=3.20

Expand Down
2 changes: 1 addition & 1 deletion hack/dockerfiles/doctoc.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# syntax=docker/dockerfile-upstream:master@sha256:df54e73548d586209f6fc6d34d61edf8277e1b9d2704aff8fe75294a17c6a29b
# syntax=docker/dockerfile-upstream:master

ARG NODE_VERSION=19

Expand Down
4 changes: 3 additions & 1 deletion hack/dockerfiles/generated-files.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
# syntax=docker/dockerfile-upstream:master@sha256:df54e73548d586209f6fc6d34d61edf8277e1b9d2704aff8fe75294a17c6a29b
# syntax=docker/dockerfile-upstream:master

ARG GO_VERSION=1.22
ARG DEBIAN_VERSION=bookworm
ARG PROTOC_VERSION=3.11.4
ARG PROTOC_GOOGLEAPIS_VERSION=2af421884dd468d565137215c946ebe4e245ae26

# protoc is dynamically linked to glibc so can't use alpine base

# base defines common stage with Go tools
FROM golang:${GO_VERSION}-${DEBIAN_VERSION} AS base
RUN apt-get update && apt-get --no-install-recommends install -y git unzip

Expand Down
4 changes: 2 additions & 2 deletions hack/dockerfiles/lint.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# syntax=docker/dockerfile-upstream:master@sha256:df54e73548d586209f6fc6d34d61edf8277e1b9d2704aff8fe75294a17c6a29b
# syntax=docker/dockerfile-upstream:master

ARG GO_VERSION=1.22
ARG ALPINE_VERSION=3.20
ARG XX_VERSION=1.4.0
ARG PROTOLINT_VERSION=0.45.0
ARG GOLANGCI_LINT_VERSION=1.61.0
ARG GOPLS_VERSION=v0.20.0
# disabled: deprecated unusedvariable simplifyrange
# GOPLS_ANALYZERS defines gopls analyzers to be run. disabled by default: deprecated unusedvariable simplifyrange
ARG GOPLS_ANALYZERS="embeddirective fillreturns infertypeargs nonewvars noresultvalues simplifycompositelit simplifyslice stubmethods undeclaredname unusedparams useany"

FROM --platform=$BUILDPLATFORM golang:${GO_VERSION}-alpine${ALPINE_VERSION} AS golang-base
Expand Down
2 changes: 1 addition & 1 deletion hack/dockerfiles/shfmt.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# syntax=docker/dockerfile-upstream:master@sha256:df54e73548d586209f6fc6d34d61edf8277e1b9d2704aff8fe75294a17c6a29b
# syntax=docker/dockerfile-upstream:master

FROM mvdan/shfmt:v3.1.2-alpine AS shfmt
WORKDIR /src
Expand Down
2 changes: 1 addition & 1 deletion hack/dockerfiles/vendor.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# syntax=docker/dockerfile-upstream:master@sha256:df54e73548d586209f6fc6d34d61edf8277e1b9d2704aff8fe75294a17c6a29b
# syntax=docker/dockerfile-upstream:master

ARG GO_VERSION=1.22
ARG ALPINE_VERSION=3.20
Expand Down

0 comments on commit 62bda5c

Please sign in to comment.