pomerium/Dockerfile
2019-07-07 17:13:50 -04:00

25 lines
658 B
Docker
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

FROM golang:latest as build
WORKDIR /go/src/github.com/pomerium/pomerium
# docker build --build-arg ARCH=arm --build-arg ARM=7 .
# frustratingly not supported by dockerhub automated builds though
ARG ARCH=amd64
ARG ARM=7  
ENV CGO_ENABLED=0
ENV GO111MODULE=on
ENV GOARCH=${ARCH}
ENV GOARM=${ARM}
# cache depedency downloads
COPY go.mod go.sum ./
RUN go mod download
COPY . .
# build
RUN make
RUN touch /config.yaml
FROM gcr.io/distroless/static
WORKDIR /pomerium
COPY --from=build /go/src/github.com/pomerium/pomerium/bin/* /bin/
COPY --from=build /config.yaml /pomerium/config.yaml
ENTRYPOINT [ "/bin/pomerium" ]
CMD ["-config","/pomerium/config.yaml"]