deployment: multi-arch master images (#2896)

This commit is contained in:
Travis Groth 2022-01-05 11:00:24 -05:00 committed by GitHub
parent 82217bac6b
commit 62b07cb530
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 1 deletions

View file

@ -17,6 +17,9 @@ jobs:
with: with:
fetch-depth: 0 fetch-depth: 0
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
- name: Set up Docker Buildx - name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1 uses: docker/setup-buildx-action@v1
@ -46,6 +49,7 @@ jobs:
context: . context: .
file: ./Dockerfile file: ./Dockerfile
push: true push: true
platforms: linux/amd64,linux/arm64
tags: ${{ steps.metadata.outputs.tags }} tags: ${{ steps.metadata.outputs.tags }}
labels: | labels: |
org.opencontainers.image.created=${{ steps.metadata.outputs.timestamp }} org.opencontainers.image.created=${{ steps.metadata.outputs.timestamp }}
@ -58,6 +62,7 @@ jobs:
context: . context: .
file: ./Dockerfile.debug file: ./Dockerfile.debug
push: true push: true
platforms: linux/amd64,linux/arm64
tags: pomerium/pomerium:debug tags: pomerium/pomerium:debug
labels: | labels: |
org.opencontainers.image.created=${{ steps.metadata.outputs.timestamp }} org.opencontainers.image.created=${{ steps.metadata.outputs.timestamp }}

View file

@ -1,3 +1,5 @@
ARG ARCH=amd64
FROM golang:latest as build FROM golang:latest as build
WORKDIR /go/src/github.com/pomerium/pomerium WORKDIR /go/src/github.com/pomerium/pomerium
@ -20,7 +22,7 @@ RUN apt-get update && apt-get install -y ca-certificates
# Remove expired root (https://github.com/pomerium/pomerium/issues/2653) # Remove expired root (https://github.com/pomerium/pomerium/issues/2653)
RUN rm /usr/share/ca-certificates/mozilla/DST_Root_CA_X3.crt && update-ca-certificates RUN rm /usr/share/ca-certificates/mozilla/DST_Root_CA_X3.crt && update-ca-certificates
FROM gcr.io/distroless/base:debug FROM gcr.io/distroless/base:debug-${ARCH}
ENV AUTOCERT_DIR /data/autocert ENV AUTOCERT_DIR /data/autocert
WORKDIR /pomerium WORKDIR /pomerium
COPY --from=build /go/src/github.com/pomerium/pomerium/bin/* /bin/ COPY --from=build /go/src/github.com/pomerium/pomerium/bin/* /bin/