summaryrefslogtreecommitdiff
path: root/vendor/github.com/docker/distribution/Dockerfile
diff options
context:
space:
mode:
authordependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>2022-02-08 12:09:28 +0000
committerGitHub <noreply@github.com>2022-02-08 12:09:28 +0000
commit5bcd9134ff0c2e3af740b388da2d91c70dd7456a (patch)
treeda911e481c93441cab97a20cfbab4318b87acded /vendor/github.com/docker/distribution/Dockerfile
parent46d9a2570ad3eb4f1d7fe0928927e644ebe8a2a3 (diff)
downloadpodman-5bcd9134ff0c2e3af740b388da2d91c70dd7456a.tar.gz
podman-5bcd9134ff0c2e3af740b388da2d91c70dd7456a.tar.bz2
podman-5bcd9134ff0c2e3af740b388da2d91c70dd7456a.zip
Bump github.com/docker/distribution
Bumps [github.com/docker/distribution](https://github.com/docker/distribution) from 2.7.1+incompatible to 2.8.0+incompatible. - [Release notes](https://github.com/docker/distribution/releases) - [Commits](https://github.com/docker/distribution/compare/v2.7.1...v2.8.0) --- updated-dependencies: - dependency-name: github.com/docker/distribution dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com>
Diffstat (limited to 'vendor/github.com/docker/distribution/Dockerfile')
-rw-r--r--vendor/github.com/docker/distribution/Dockerfile49
1 files changed, 36 insertions, 13 deletions
diff --git a/vendor/github.com/docker/distribution/Dockerfile b/vendor/github.com/docker/distribution/Dockerfile
index 9537817ca..9d30d3771 100644
--- a/vendor/github.com/docker/distribution/Dockerfile
+++ b/vendor/github.com/docker/distribution/Dockerfile
@@ -1,22 +1,45 @@
-FROM golang:1.11-alpine AS build
+# syntax=docker/dockerfile:1.3
-ENV DISTRIBUTION_DIR /go/src/github.com/docker/distribution
-ENV BUILDTAGS include_oss include_gcs
+ARG GO_VERSION=1.16
+ARG GORELEASER_XX_VERSION=1.2.5
-ARG GOOS=linux
-ARG GOARCH=amd64
-ARG GOARM=6
+FROM --platform=$BUILDPLATFORM crazymax/goreleaser-xx:${GORELEASER_XX_VERSION} AS goreleaser-xx
+FROM --platform=$BUILDPLATFORM golang:${GO_VERSION}-alpine AS base
+COPY --from=goreleaser-xx / /
+RUN apk add --no-cache file git
+WORKDIR /go/src/github.com/docker/distribution
-RUN set -ex \
- && apk add --no-cache make git file
+FROM base AS build
+ENV GO111MODULE=auto
+ENV CGO_ENABLED=0
+ARG TARGETPLATFORM
+ARG PKG="github.com/distribution/distribution"
+ARG BUILDTAGS="include_oss include_gcs"
+RUN --mount=type=bind,rw \
+ --mount=type=cache,target=/root/.cache/go-build \
+ --mount=target=/go/pkg/mod,type=cache \
+ goreleaser-xx --debug \
+ --name="registry" \
+ --dist="/out" \
+ --main="./cmd/registry" \
+ --flags="-v" \
+ --ldflags="-s -w -X '$PKG/version.Version={{.Version}}' -X '$PKG/version.Revision={{.Commit}}' -X '$PKG/version.Package=$PKG'" \
+ --tags="$BUILDTAGS" \
+ --files="LICENSE" \
+ --files="README.md"
-WORKDIR $DISTRIBUTION_DIR
-COPY . $DISTRIBUTION_DIR
-RUN CGO_ENABLED=0 make PREFIX=/go clean binaries && file ./bin/registry | grep "statically linked"
+FROM scratch AS artifacts
+COPY --from=build /out/*.tar.gz /
+COPY --from=build /out/*.zip /
+COPY --from=build /out/*.sha256 /
-FROM alpine
+FROM scratch AS binary
+COPY --from=build /usr/local/bin/registry* /
+
+FROM alpine:3.14
+RUN apk add --no-cache ca-certificates
COPY cmd/registry/config-dev.yml /etc/docker/registry/config.yml
-COPY --from=build /go/src/github.com/docker/distribution/bin/registry /bin/registry
+COPY --from=build /usr/local/bin/registry /bin/registry
VOLUME ["/var/lib/registry"]
EXPOSE 5000
ENTRYPOINT ["registry"]