Merge pull request #89 from glide-the/update_build_docker

chore(docker): update Dockerfile to copy built application from dist …
This commit is contained in:
Xinlu Lai 2025-09-14 15:02:03 +08:00 committed by GitHub
commit 78b49355cd
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 8 additions and 7 deletions

View File

@ -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"]

View File

@ -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"
}