Skip to content

Commit

Permalink
- Switch to alpine image for ARM (#284)
Browse files Browse the repository at this point in the history
- Add Docker Hub hooks to set up build environment
- Include qemu-static binaries for AMD64 compatibility
  • Loading branch information
travisgroth committed Aug 28, 2019
1 parent 2d2f314 commit bdfe678
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 3 deletions.
4 changes: 3 additions & 1 deletion Dockerfile.arm32v6
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,10 @@ COPY . .
RUN make build
RUN touch /config.yaml

FROM gcr.io/distroless/static
FROM arm32v6/alpine
WORKDIR /pomerium
COPY --from=multiarch/qemu-user-static /usr/bin/qemu-arm-static /usr/bin/
RUN apk --no-cache add ca-certificates
COPY --from=build /go/src/github.com/pomerium/pomerium/bin/* /bin/
COPY --from=build /config.yaml /pomerium/config.yaml
ENTRYPOINT [ "/bin/pomerium" ]
Expand Down
4 changes: 3 additions & 1 deletion Dockerfile.arm32v7
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,10 @@ COPY . .
RUN make build
RUN touch /config.yaml

FROM gcr.io/distroless/static
FROM arm32v7/alpine
WORKDIR /pomerium
COPY --from=multiarch/qemu-user-static /usr/bin/qemu-arm-static /usr/bin/
RUN apk --no-cache add ca-certificates
COPY --from=build /go/src/github.com/pomerium/pomerium/bin/* /bin/
COPY --from=build /config.yaml /pomerium/config.yaml
ENTRYPOINT [ "/bin/pomerium" ]
Expand Down
4 changes: 3 additions & 1 deletion Dockerfile.arm64v8
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,10 @@ COPY . .
RUN make build
RUN touch /config.yaml

FROM gcr.io/distroless/static
FROM arm64v8/alpine
WORKDIR /pomerium
COPY --from=multiarch/qemu-user-static /usr/bin/qemu-aarch64-static /usr/bin/
RUN apk --no-cache add ca-certificates
COPY --from=build /go/src/github.com/pomerium/pomerium/bin/* /bin/
COPY --from=build /config.yaml /pomerium/config.yaml
ENTRYPOINT [ "/bin/pomerium" ]
Expand Down
4 changes: 4 additions & 0 deletions hooks/post_checkout
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/bash

apt-get update
apt-get install -y curl binfmt-support
3 changes: 3 additions & 0 deletions hooks/pre_build
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/bash

docker run --rm --privileged multiarch/qemu-user-static --reset

0 comments on commit bdfe678

Please sign in to comment.