chore: walk back on nonroot, its too much of a breaking change
This commit is contained in:
parent
6d99aca058
commit
ce4617d0e1
2 changed files with 14 additions and 15 deletions
26
Dockerfile
26
Dockerfile
|
|
@ -36,16 +36,16 @@ ARG IMAGE_TAG
|
|||
RUN IMAGE_TAG=$IMAGE_TAG pnpm run build
|
||||
RUN mkdir -p /var/lib/headplane/agent
|
||||
|
||||
FROM gcr.io/distroless/nodejs22-debian12:nonroot AS final
|
||||
COPY --from=js-build --chown=nonroot:nonroot /build/build/ /app/build/
|
||||
COPY --from=js-build --chown=nonroot:nonroot /build/drizzle /app/drizzle/
|
||||
COPY --from=js-build --chown=nonroot:nonroot /var/lib/headplane /var/lib/headplane
|
||||
COPY --from=js-build --chown=nonroot:nonroot /build/node_modules/ /app/node_modules/
|
||||
COPY --from=go-build --chown=nonroot:nonroot /build/build/hp_agent /usr/libexec/headplane/agent
|
||||
FROM gcr.io/distroless/nodejs22-debian12:latest AS final
|
||||
COPY --from=js-build /build/build/ /app/build/
|
||||
COPY --from=js-build /build/drizzle /app/drizzle/
|
||||
COPY --from=js-build /var/lib/headplane /var/lib/headplane
|
||||
COPY --from=js-build /build/node_modules/ /app/node_modules/
|
||||
COPY --from=go-build /build/build/hp_agent /usr/libexec/headplane/agent
|
||||
|
||||
# Fake shell to inform the user that they should use the debug image
|
||||
COPY --from=go-build --chown=nonroot:nonroot /build/build/sh /bin/sh
|
||||
COPY --from=go-build --chown=nonroot:nonroot /build/build/sh /bin/bash
|
||||
COPY --from=go-build /build/build/sh /bin/sh
|
||||
COPY --from=go-build /build/build/sh /bin/bash
|
||||
|
||||
WORKDIR /app
|
||||
CMD [ "/app/build/server/index.js" ]
|
||||
|
|
@ -53,11 +53,11 @@ CMD [ "/app/build/server/index.js" ]
|
|||
FROM node:22-alpine AS debug-shell
|
||||
RUN apk add --no-cache bash curl git
|
||||
|
||||
COPY --from=js-build --chown=nonroot:nonroot /build/build/ /app/build/
|
||||
COPY --from=js-build --chown=nonroot:nonroot /build/drizzle /app/drizzle/
|
||||
COPY --from=js-build --chown=nonroot:nonroot /var/lib/headplane /var/lib/headplane
|
||||
COPY --from=js-build --chown=nonroot:nonroot /build/node_modules/ /app/node_modules/
|
||||
COPY --from=go-build --chown=nonroot:nonroot /build/build/hp_agent /usr/libexec/headplane/agent
|
||||
COPY --from=js-build /build/build/ /app/build/
|
||||
COPY --from=js-build /build/drizzle /app/drizzle/
|
||||
COPY --from=js-build /var/lib/headplane /var/lib/headplane
|
||||
COPY --from=js-build /build/node_modules/ /app/node_modules/
|
||||
COPY --from=go-build /build/build/hp_agent /usr/libexec/headplane/agent
|
||||
|
||||
WORKDIR /app
|
||||
CMD [ "node", "/app/build/server/index.js" ]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue