fix: change running image to unprivileged
This commit is contained in:
32
Dockerfile
32
Dockerfile
@@ -1,17 +1,17 @@
|
||||
FROM harbor.merlin.xin/mirrors/docker.io/library/node:20-bullseye AS build
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
COPY package*.json ./
|
||||
|
||||
RUN --mount=type=cache,target=/root/.npm \
|
||||
npm install
|
||||
|
||||
COPY . .
|
||||
|
||||
RUN npm run build
|
||||
|
||||
|
||||
FROM harbor.merlin.xin/mirrors/docker.io/library/nginx:alpine
|
||||
|
||||
FROM harbor.merlin.xin/mirrors/docker.io/library/node:20-bullseye AS build
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
COPY package*.json ./
|
||||
|
||||
RUN --mount=type=cache,target=/root/.npm \
|
||||
npm install
|
||||
|
||||
COPY . .
|
||||
|
||||
RUN npm run build
|
||||
|
||||
|
||||
FROM harbor.merlin.xin/mirrors/docker.io/library/nginxinc/nginx-unprivileged:stable
|
||||
|
||||
COPY --from=build /app/dist /app/dist
|
||||
Reference in New Issue
Block a user