From fbb2db69638010b24b09f6bee6c4b85216b2b1ef Mon Sep 17 00:00:00 2001 From: glide-the <2533736852@qq.com> Date: Sat, 13 Sep 2025 22:52:39 +0800 Subject: [PATCH] chore(docker): update Dockerfile to copy built application from dist and set entrypoint correctly\n\n- Adjusted COPY command to reference the new dist directory\n- Updated entrypoint to use the correct path for cli.js --- Dockerfile | 14 +++++++------- package.json | 1 + 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/Dockerfile b/Dockerfile index f05c3e9..a9a7176 100644 --- a/Dockerfile +++ b/Dockerfile @@ -69,19 +69,19 @@ RUN npm install -g tsx WORKDIR /workspace # Copy built application from builder stage -COPY --from=builder /app/cli.js /app/cli.js +COPY --from=builder /app/dist /app/dist COPY --from=builder /app/package.json /app/package.json COPY --from=builder /app/node_modules /app/node_modules COPY --from=builder /app/src /app/src # Create the entrypoint script -RUN cat << 'EOF' > /entrypoint.sh -#!/bin/sh +# RUN cat << 'EOF' > /entrypoint.sh +# #!/bin/sh -/root/.bun/bin/bun /app/cli.js -c /workspace "$@" -EOF +# /root/.bun/bin/bun /app/dist/entrypoints/cli.js -c /workspace "$@" +# EOF -RUN chmod +x /entrypoint.sh +# RUN chmod +x /entrypoint.sh # Set the entrypoint -ENTRYPOINT ["/entrypoint.sh"] +ENTRYPOINT ["/root/.bun/bin/bun", "/app/dist/entrypoints/cli.js", "-c", "/workspace"] diff --git a/package.json b/package.json index 69fa46d..6357c20 100644 --- a/package.json +++ b/package.json @@ -95,6 +95,7 @@ "@types/jest": "^30.0.0", "@types/node": "^24.1.0", "bun-types": "latest", + "esbuild": "^0.25.9", "prettier": "^3.6.2", "typescript": "^5.9.2" }