git.iko.soy/typeable/oauth2-proxy
on master help sign in
Drop old makefiles in favour of buildx
8dea813Joel Speed
Dockerfile.arm64deleted−32
@@ -1,32 +0,0 @@
1−FROM golang:1.16-buster AS builder
2−
3−# Copy sources
4−WORKDIR $GOPATH/src/github.com/oauth2-proxy/oauth2-proxy
5−
6−# Fetch dependencies
7−COPY go.mod go.sum ./
8−RUN GO111MODULE=on go mod download
9−
10−# Now pull in our code
11−COPY . .
12−
13−ARG VERSION
14−
15−# Build binary and make sure there is at least an empty key file.
16−# This is useful for GCP App Engine custom runtime builds, because
17−# you cannot use multiline variables in their app.yaml, so you have to
18−# build the key into the container and then tell it where it is
19−# by setting OAUTH2_PROXY_JWT_KEY_FILE=/etc/ssl/private/jwt_signing_key.pem
20−# in app.yaml instead.
21−RUN VERSION=${VERSION} GOARCH=arm64 make build && touch jwt_signing_key.pem
22−
23−# Copy binary to alpine
24−FROM arm64v8/alpine:3.14
25−COPY nsswitch.conf /etc/nsswitch.conf
26−COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt
27−COPY --from=builder /go/src/github.com/oauth2-proxy/oauth2-proxy/oauth2-proxy /bin/oauth2-proxy
28−COPY --from=builder /go/src/github.com/oauth2-proxy/oauth2-proxy/jwt_signing_key.pem /etc/ssl/private/jwt_signing_key.pem
29−
30−USER 2000:2000
31−
32−ENTRYPOINT ["/bin/oauth2-proxy"]
Dockerfile.armv6deleted−32
@@ -1,32 +0,0 @@
1−FROM golang:1.16-buster AS builder
2−
3−# Copy sources
4−WORKDIR $GOPATH/src/github.com/oauth2-proxy/oauth2-proxy
5−
6−# Fetch dependencies
7−COPY go.mod go.sum ./
8−RUN GO111MODULE=on go mod download
9−
10−# Now pull in our code
11−COPY . .
12−
13−ARG VERSION
14−
15−# Build binary and make sure there is at least an empty key file.
16−# This is useful for GCP App Engine custom runtime builds, because
17−# you cannot use multiline variables in their app.yaml, so you have to
18−# build the key into the container and then tell it where it is
19−# by setting OAUTH2_PROXY_JWT_KEY_FILE=/etc/ssl/private/jwt_signing_key.pem
20−# in app.yaml instead.
21−RUN VERSION=${VERSION} GOARCH=arm GOARM=6 make build && touch jwt_signing_key.pem
22−
23−# Copy binary to alpine
24−FROM arm32v6/alpine:3.14
25−COPY nsswitch.conf /etc/nsswitch.conf
26−COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt
27−COPY --from=builder /go/src/github.com/oauth2-proxy/oauth2-proxy/oauth2-proxy /bin/oauth2-proxy
28−COPY --from=builder /go/src/github.com/oauth2-proxy/oauth2-proxy/jwt_signing_key.pem /etc/ssl/private/jwt_signing_key.pem
29−
30−USER 2000:2000
31−
32−ENTRYPOINT ["/bin/oauth2-proxy"]
Makefile+12−12
@@ -52,13 +52,13 @@ docker:
52
52
53.PHONY: docker-all
53.PHONY: docker-all
54docker-all: docker
54docker-all: docker
55− $(DOCKER_BUILDX) -f Dockerfile -t $(REGISTRY)/oauth2-proxy:latest-amd64 .
55+ $(DOCKER_BUILDX) --platform linux/amd64 -t $(REGISTRY)/oauth2-proxy:latest-amd64 .
56 $(DOCKER_BUILDX_X_PLATFORM) -f Dockerfile -t $(REGISTRY)/oauth2-proxy:${VERSION} .
56 $(DOCKER_BUILDX_X_PLATFORM) -f Dockerfile -t $(REGISTRY)/oauth2-proxy:${VERSION} .
57− $(DOCKER_BUILDX) -f Dockerfile -t $(REGISTRY)/oauth2-proxy:${VERSION}-amd64 .
57+ $(DOCKER_BUILDX) --platform linux/amd64 -t $(REGISTRY)/oauth2-proxy:${VERSION}-amd64 .
58− $(DOCKER_BUILDX) -f Dockerfile.arm64 -t $(REGISTRY)/oauth2-proxy:latest-arm64 .
58+ $(DOCKER_BUILDX) --platform linux/arm64 -t $(REGISTRY)/oauth2-proxy:latest-arm64 .
59− $(DOCKER_BUILDX) -f Dockerfile.arm64 -t $(REGISTRY)/oauth2-proxy:${VERSION}-arm64 .
59+ $(DOCKER_BUILDX) --platform linux/arm64 -t $(REGISTRY)/oauth2-proxy:${VERSION}-arm64 .
60− $(DOCKER_BUILDX) -f Dockerfile.armv6 -t $(REGISTRY)/oauth2-proxy:latest-armv6 .
60+ $(DOCKER_BUILDX) --platform linux/arm/v6 -t $(REGISTRY)/oauth2-proxy:latest-armv6 .
61− $(DOCKER_BUILDX) -f Dockerfile.armv6 -t $(REGISTRY)/oauth2-proxy:${VERSION}-armv6 .
61+ $(DOCKER_BUILDX) --platform linux/arm/v6 -t $(REGISTRY)/oauth2-proxy:${VERSION}-armv6 .
62
62
63.PHONY: docker-push
63.PHONY: docker-push
64docker-push:
64docker-push:
@@ -66,13 +66,13 @@ docker-push:
66
66
67.PHONY: docker-push-all
67.PHONY: docker-push-all
68docker-push-all: docker-push
68docker-push-all: docker-push
69− $(DOCKER_BUILDX_PUSH) -t $(REGISTRY)/oauth2-proxy:latest-amd64 .
69+ $(DOCKER_BUILDX_PUSH) --platform linux/amd64 -t $(REGISTRY)/oauth2-proxy:latest-amd64 .
70 $(DOCKER_BUILDX_PUSH_X_PLATFORM) -t $(REGISTRY)/oauth2-proxy:${VERSION} .
70 $(DOCKER_BUILDX_PUSH_X_PLATFORM) -t $(REGISTRY)/oauth2-proxy:${VERSION} .
71− $(DOCKER_BUILDX_PUSH) -t $(REGISTRY)/oauth2-proxy:${VERSION}-amd64 .
71+ $(DOCKER_BUILDX_PUSH) --platform linux/amd64 -t $(REGISTRY)/oauth2-proxy:${VERSION}-amd64 .
72− $(DOCKER_BUILDX_PUSH) -f Dockerfile.arm64 -t $(REGISTRY)/oauth2-proxy:latest-arm64 .
72+ $(DOCKER_BUILDX_PUSH) --platform linux/arm64 -t $(REGISTRY)/oauth2-proxy:latest-arm64 .
73− $(DOCKER_BUILDX_PUSH) -f Dockerfile.arm64 -t $(REGISTRY)/oauth2-proxy:${VERSION}-arm64 .
73+ $(DOCKER_BUILDX_PUSH) --platform linux/arm64 -t $(REGISTRY)/oauth2-proxy:${VERSION}-arm64 .
74− $(DOCKER_BUILDX_PUSH) -f Dockerfile.armv6 -t $(REGISTRY)/oauth2-proxy:latest-armv6 .
74+ $(DOCKER_BUILDX_PUSH) --platform linux/arm/v6 -t $(REGISTRY)/oauth2-proxy:latest-armv6 .
75− $(DOCKER_BUILDX_PUSH) -f Dockerfile.armv6 -t $(REGISTRY)/oauth2-proxy:${VERSION}-armv6 .
75+ $(DOCKER_BUILDX_PUSH) --platform linux/arm/v6 -t $(REGISTRY)/oauth2-proxy:${VERSION}-armv6 .
76
76
77.PHONY: generate
77.PHONY: generate
78generate:
78generate: