mirror of
https://github.com/pomerium/pomerium.git
synced 2025-04-29 02:16:28 +02:00
38 lines
1.1 KiB
Docker
38 lines
1.1 KiB
Docker
FROM node:lts-bookworm@sha256:42a4d97d4abf2f278c323370cf9c8dbccc2a238acceebceb53711926ecfb4110 as ui
|
|
WORKDIR /build
|
|
|
|
COPY .git ./.git
|
|
COPY Makefile ./Makefile
|
|
|
|
# download yarn dependencies
|
|
COPY ui/yarn.lock ./ui/yarn.lock
|
|
COPY ui/package.json ./ui/package.json
|
|
RUN make yarn
|
|
|
|
# build ui
|
|
COPY ./ui/ ./ui/
|
|
RUN make build-ui
|
|
|
|
FROM golang:1.21.3-bookworm@sha256:d0214956a9c50c300e430c1f6c0a820007ace238e5242c53762e61b344659e05 as build
|
|
WORKDIR /go/src/github.com/pomerium/pomerium
|
|
|
|
RUN apt-get update \
|
|
&& apt-get -y --no-install-recommends install zip
|
|
|
|
# cache dependency downloads
|
|
COPY go.mod go.sum ./
|
|
RUN go mod download
|
|
COPY . .
|
|
COPY --from=ui /build/ui/dist ./ui/dist
|
|
|
|
# build
|
|
RUN make build-go NAME=pomerium
|
|
RUN touch /config.yaml
|
|
|
|
FROM gcr.io/distroless/base-debian12:debug@sha256:d2890b2740037c95fca7fe44c27e09e91f2e557c62cf0910d2569b0dedc98ddc
|
|
ENV AUTOCERT_DIR /data/autocert
|
|
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"]
|