Skip to content

Commit

Permalink
update runner image
Browse files Browse the repository at this point in the history
  • Loading branch information
inetol committed Nov 21, 2024
1 parent 785c44c commit bc627be
Showing 1 changed file with 14 additions and 3 deletions.
17 changes: 14 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,17 @@ COPY . ./
RUN bun install --frozen-lockfile && \
bun run build:standalone

FROM cgr.dev/chainguard/cc-dynamic:latest
FROM docker.io/library/alpine:3.20
WORKDIR /backend/

COPY --chown=nonroot --from=builder /build/dist/backend ./
COPY --chown=nonroot --from=builder /build/LICENSE ./
# FIXME: https://github.com/oven-sh/bun/issues/15307
RUN apk add --no-cache libgcc libstdc++

RUN adduser -D -h /backend jspaste && \
chown jspaste:jspaste /backend/

COPY --chown=jspaste:jspaste --from=builder /build/dist/backend ./
COPY --chown=jspaste:jspaste --from=builder /build/LICENSE ./

LABEL org.opencontainers.image.url="https://jspaste.eu" \
org.opencontainers.image.source="https://github.com/jspaste/backend" \
Expand All @@ -19,6 +25,11 @@ LABEL org.opencontainers.image.url="https://jspaste.eu" \
org.opencontainers.image.documentation="https://docs.jspaste.eu" \
org.opencontainers.image.licenses="EUPL-1.2"

ARG BUN_RUNTIME_TRANSPILER_CACHE_PATH=0
ENV BUN_RUNTIME_TRANSPILER_CACHE_PATH=${BUN_RUNTIME_TRANSPILER_CACHE_PATH}

USER jspaste

VOLUME /backend/storage/
EXPOSE 4000

Expand Down

0 comments on commit bc627be

Please sign in to comment.