|
|
|
@ -10,14 +10,14 @@ RUN apk add --no-cache python3 make g++ gcc dos2unix |
|
|
|
COPY --chown=bun:bun ./package.json ./package.json |
|
|
|
COPY --chown=bun:bun ./bun.lockb ./bun.lockb |
|
|
|
COPY --chown=bun:bun ./knexfile.mjs ./knexfile.mjs |
|
|
|
COPY --chown=bun:bun ./.env.production ./.env.production |
|
|
|
COPY --chown=bun:bun ./jsconfig.json ./jsconfig.json |
|
|
|
COPY --chown=bun:bun ./src ./src |
|
|
|
COPY --chown=bun:bun ./public ./public |
|
|
|
COPY --chown=bun:bun ./entrypoint.sh ./entrypoint.sh |
|
|
|
|
|
|
|
# 安装生产依赖和修复 entrypoint.sh |
|
|
|
RUN bun install --frozen-lockfile --production --registry https://registry.npmjs.org && \ |
|
|
|
# RUN bun install --frozen-lockfile --production --registry https://registry.npmjs.org && \ |
|
|
|
RUN bun install --frozen-lockfile --production && \ |
|
|
|
# 修复 entrypoint.sh 的换行符 |
|
|
|
dos2unix ./entrypoint.sh && \ |
|
|
|
chmod +x ./entrypoint.sh |
|
|
|
@ -46,3 +46,5 @@ HEALTHCHECK --interval=30s --timeout=10s --start-period=40s --retries=3 \ |
|
|
|
|
|
|
|
# 设置入口点 |
|
|
|
ENTRYPOINT ["./entrypoint.sh"] |
|
|
|
|
|
|
|
# docker build -t koa3-demo . |