tachybase_todo/docker/nocobase/Dockerfile

43 lines
1.1 KiB
Docker
Raw Normal View History

2023-05-26 17:03:08 +08:00
FROM node:18-slim as builder
WORKDIR /app
RUN cd /app \
chore(versions): 😊 publish v0.7.6-alpha.2 (#954) # Conflicts: # docker/app-mysql/docker-compose.yml # docker/app-postgres/docker-compose.yml # docker/app-sqlite/docker-compose.yml # docs/en-US/release-notes.md # docs/zh-CN/release-notes.md # lerna.json # packages/app/client/package.json # packages/app/server/package.json # packages/core/acl/package.json # packages/core/actions/package.json # packages/core/build/package.json # packages/core/cache/package.json # packages/core/cli/package.json # packages/core/client/package.json # packages/core/create-nocobase-app/package.json # packages/core/database/package.json # packages/core/devtools/package.json # packages/core/dumi-theme-nocobase/package.json # packages/core/resourcer/package.json # packages/core/sdk/package.json # packages/core/server/package.json # packages/core/test/package.json # packages/core/utils/package.json # packages/plugins/acl/package.json # packages/plugins/audit-logs/package.json # packages/plugins/china-region/package.json # packages/plugins/client/package.json # packages/plugins/collection-manager/package.json # packages/plugins/error-handler/package.json # packages/plugins/export/package.json # packages/plugins/file-manager/package.json # packages/plugins/multi-app-manager/package.json # packages/plugins/notifications/package.json # packages/plugins/system-settings/package.json # packages/plugins/ui-routes-storage/package.json # packages/plugins/ui-schema-storage/package.json # packages/plugins/users/package.json # packages/plugins/verification/package.json # packages/plugins/workflow/package.json # packages/presets/nocobase/package.json
2022-10-24 16:56:27 +08:00
&& yarn config set network-timeout 600000 -g \
&& yarn create nocobase-app my-nocobase-app -a -e APP_ENV=production \
&& cd /app/my-nocobase-app \
&& yarn install --production
RUN cd /app \
&& rm -rf nocobase.tar.gz \
2022-07-28 21:06:21 +08:00
&& tar -zcf ./nocobase.tar.gz -C /app/my-nocobase-app .
2023-05-26 17:03:08 +08:00
FROM node:18-slim
# COPY ./sources.list /etc/apt/sources.list
RUN ARCH= && dpkgArch="$(dpkg --print-architecture)" \
&& case "${dpkgArch##*-}" in \
amd64) ARCH='x64';; \
ppc64el) ARCH='ppc64le';; \
s390x) ARCH='s390x';; \
arm64) ARCH='arm64';; \
armhf) ARCH='armv7l';; \
i386) ARCH='x86';; \
*) echo "unsupported architecture"; exit 1 ;; \
esac \
&& set -ex \
# libatomic1 for arm
&& apt-get update && apt-get install -y nginx
RUN rm -rf /etc/nginx/sites-enabled/default
COPY ./nocobase.conf /etc/nginx/sites-enabled/nocobase.conf
COPY --from=builder /app/nocobase.tar.gz /app/nocobase.tar.gz
WORKDIR /app/nocobase
COPY docker-entrypoint.sh /app/
# COPY docker-entrypoint.sh /usr/local/bin/
# ENTRYPOINT ["docker-entrypoint.sh"]
CMD ["/app/docker-entrypoint.sh"]