Files
core/dockerfile
Alisa 67bf187d99 chore: docker image improvements (#1692)
* feat: add --db_options command line options to set mongodb connection options

* feat: use standard docker-entrypoint.sh and ENTRYPOINT

* fix: make docker-compose file more generic

* fix: output configurations before exec

* fix: incorrect command line option for mongodb collection name
2024-05-12 11:41:42 +08:00

26 lines
557 B
Plaintext

FROM node:20-alpine as builder
WORKDIR /app
COPY . .
RUN apk add git make g++ alpine-sdk python3 py3-pip unzip
RUN npm i -g pnpm
RUN pnpm install
RUN pnpm bundle
RUN mv apps/core/out ./out
RUN node apps/core/download-latest-admin-assets.js
FROM node:20-alpine
RUN apk add zip unzip mongodb-tools bash fish rsync jq curl --no-cache
WORKDIR /app
COPY --from=builder /app/out .
COPY --from=builder /app/assets ./assets
COPY docker-entrypoint.sh .
RUN chmod +x docker-entrypoint.sh
ENV TZ=Asia/Shanghai
EXPOSE 2333
ENTRYPOINT [ "./docker-entrypoint.sh" ]