refactor: update Dockerfile
This commit is contained in:
parent
bbbb9ba222
commit
6bf2dfedf2
@ -6,11 +6,13 @@ yarn-debug.log*
|
|||||||
yarn-error.log*
|
yarn-error.log*
|
||||||
pnpm-debug.log*
|
pnpm-debug.log*
|
||||||
lerna-debug.log*
|
lerna-debug.log*
|
||||||
|
|
||||||
.DS_Store
|
.DS_Store
|
||||||
coverage
|
coverage
|
||||||
*.local
|
*.local
|
||||||
|
|
||||||
|
dist
|
||||||
|
node_modules
|
||||||
.vscode/*
|
.vscode/*
|
||||||
!.vscode/extensions.json
|
!.vscode/extensions.json
|
||||||
.idea
|
.idea
|
||||||
@ -20,4 +22,4 @@ coverage
|
|||||||
*.sln
|
*.sln
|
||||||
*.sw?
|
*.sw?
|
||||||
docs
|
docs
|
||||||
node
|
node
|
||||||
@ -5,8 +5,8 @@ ENV PNPM_HOME="/pnpm"
|
|||||||
ENV PATH="$PNPM_HOME:$PATH"
|
ENV PATH="$PNPM_HOME:$PATH"
|
||||||
RUN corepack enable
|
RUN corepack enable
|
||||||
|
|
||||||
WORKDIR /src
|
WORKDIR /app
|
||||||
COPY ./ ./
|
COPY . .
|
||||||
|
|
||||||
# RUN两次方便观察install和build, 也可以用pnpm cache and locked
|
# RUN两次方便观察install和build, 也可以用pnpm cache and locked
|
||||||
RUN pnpm install
|
RUN pnpm install
|
||||||
@ -14,4 +14,4 @@ RUN npm run build
|
|||||||
|
|
||||||
FROM --platform=${BUILDPLATFORM:-linux/amd64,linux/arm64} ghcr.io/rookie-luochao/nginx-runner:latest
|
FROM --platform=${BUILDPLATFORM:-linux/amd64,linux/arm64} ghcr.io/rookie-luochao/nginx-runner:latest
|
||||||
|
|
||||||
COPY --from=builder /src/dist /app
|
COPY --from=builder /app/dist .
|
||||||
Loading…
Reference in New Issue
Block a user