pomerium/Dockerfile.debug
dependabot[bot] 806a901fa1
chore(deps): bump golang from 1.21.4-bookworm to 1.21.5-bookworm (#4828)
Bumps golang from 1.21.4-bookworm to 1.21.5-bookworm.

---
updated-dependencies:
- dependency-name: golang
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-12-07 12:30:31 -05:00

41 lines
1.2 KiB
Text

FROM node:lts-bookworm@sha256:445acd9b2ef7e9de665424053bf95652e0b8995ef36500557d48faf29300170a 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.5-bookworm@sha256:a6b787c7f9046e3fdaa97bca1f76fd23ff4108f612de885e1af87e0dccc02f99 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-debug NAME=pomerium
RUN touch /config.yaml
RUN go install github.com/go-delve/delve/cmd/dlv@latest
FROM debian:bookworm@sha256:22cc4de537485807b7efe6f4c942d7460c4482852f49434f9c022c044c545a90
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
COPY --from=build /go/bin/dlv /bin
COPY scripts/debug-entrypoint.sh /
ENTRYPOINT [ "/bin/pomerium" ]
CMD ["-config","/pomerium/config.yaml"]