chore: update Dockerfile and add .dockerignore

- Modified the Dockerfile to change the way application code is added, improving clarity and structure.
- Updated the COPY command to reference the correct path for built artifacts.
- Added a new .dockerignore file to exclude node_modules from the Docker build context, optimizing the build process.
- Removed the unnecessary .Dockerfile.swp file.
This commit is contained in:
Marvin Zhang
2025-04-16 10:40:31 +08:00
parent 864ab25d83
commit ca5113fd33
3 changed files with 2 additions and 2 deletions

Binary file not shown.

View File

@@ -12,7 +12,7 @@ WORKDIR /app
RUN npm install -g pnpm
# Copy application code
ADD crawlab-ui/* .
ADD ./crawlab-ui /app
# Install project dependencies
RUN pnpm install
@@ -24,4 +24,4 @@ RUN pnpm run build
FROM alpine:3.14
# Copy only the built artifacts from the build stage
COPY --from=build /app/apps/crawlab/dist /app/dist
COPY --from=build /app/dist /app/dist