mirror of
https://github.com/traberph/short.git
synced 2026-11-22 22:55:12 +00:00
Compare commits
1
Commits
v2.0.0
..
b338e1abb4
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b338e1abb4 |
+7
-2
@@ -1,4 +1,4 @@
|
||||
FROM node:24-slim AS base
|
||||
FROM node:24-alpine AS base
|
||||
WORKDIR /app
|
||||
RUN corepack enable
|
||||
COPY package.json pnpm-lock.yaml pnpm-workspace.yaml ./
|
||||
@@ -11,7 +11,12 @@ RUN pnpm build
|
||||
FROM base AS prod-deps
|
||||
RUN pnpm install --frozen-lockfile --prod
|
||||
|
||||
FROM node:24-slim AS runner
|
||||
FROM node:24-alpine AS runner
|
||||
# The app only needs the node binary. npm, npx, corepack and yarn ship with the base image and carry
|
||||
# most of its known vulnerabilities, so they're removed; pending Alpine security updates are applied.
|
||||
RUN apk upgrade --no-cache \
|
||||
&& rm -rf /usr/local/lib/node_modules /usr/local/bin/npm /usr/local/bin/npx /usr/local/bin/corepack \
|
||||
/usr/local/bin/yarn /usr/local/bin/yarnpkg /opt/yarn-*
|
||||
WORKDIR /app
|
||||
ENV NODE_ENV=production \
|
||||
PORT=3000 \
|
||||
|
||||
Reference in New Issue
Block a user