Skip to content

Commit

Permalink
deployment: multiarch main image (#27)
Browse files Browse the repository at this point in the history
  • Loading branch information
travisgroth committed Jan 13, 2022
1 parent c15cee3 commit bc92c22
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 6 deletions.
1 change: 1 addition & 0 deletions .github/workflows/docker-main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,5 +41,6 @@ jobs:
context: .
file: ./Dockerfile
push: true
platforms: linux/amd64,linux/arm64
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ COPY . .
# build
RUN make

FROM gcr.io/distroless/base:debug
FROM gcr.io/distroless/base:debug-${TARGETARCH:-amd64}
WORKDIR /pomerium
COPY --from=build /go/src/github.com/pomerium/cli/bin/* /bin/
ENTRYPOINT [ "/bin/pomerium-cli" ]
4 changes: 1 addition & 3 deletions Dockerfile.release
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
ARG ARCH

FROM gcr.io/distroless/static:latest-${ARCH}
FROM gcr.io/distroless/static:latest-${TARGETARCH:-amd64}
WORKDIR /pomerium
COPY pomerium* /bin/
ENTRYPOINT [ "/bin/pomerium-cli" ]
4 changes: 2 additions & 2 deletions goreleaser.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ dockers:
dockerfile: Dockerfile.release
build_flag_templates:
- "--pull"
- "--build-arg=ARCH=amd64"
- "--platform=linux/amd64"
- "--label=org.opencontainers.image.created={{.Date}}"
- "--label=org.opencontainers.image.name={{.ProjectName}}"
- "--label=org.opencontainers.image.revision={{.FullCommit}}"
Expand All @@ -145,7 +145,7 @@ dockers:
dockerfile: Dockerfile.release
build_flag_templates:
- "--pull"
- "--build-arg=ARCH=arm64"
- "--platform=linux/arm64"
- "--label=org.opencontainers.image.created={{.Date}}"
- "--label=org.opencontainers.image.name={{.ProjectName}}"
- "--label=org.opencontainers.image.revision={{.FullCommit}}"
Expand Down

0 comments on commit bc92c22

Please sign in to comment.