diff --git a/.dockerignore b/.dockerignore index 7bed73c..57301a8 100644 --- a/.dockerignore +++ b/.dockerignore @@ -6,11 +6,13 @@ yarn-debug.log* yarn-error.log* pnpm-debug.log* lerna-debug.log* - + .DS_Store coverage *.local +dist +node_modules .vscode/* !.vscode/extensions.json .idea @@ -20,4 +22,4 @@ coverage *.sln *.sw? docs -node +node \ No newline at end of file diff --git a/Dockerfile b/Dockerfile index b72e24a..d42609a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -5,8 +5,8 @@ ENV PNPM_HOME="/pnpm" ENV PATH="$PNPM_HOME:$PATH" RUN corepack enable -WORKDIR /src -COPY ./ ./ +WORKDIR /app +COPY . . # RUN两次方便观察install和build, 也可以用pnpm cache and locked 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 -COPY --from=builder /src/dist /app \ No newline at end of file +COPY --from=builder /app/dist . \ No newline at end of file