diff --git a/.github/workflows/build-docker-image.yml b/.github/workflows/build-docker-image.yml index 49c9d2c4d2..320f34e393 100644 --- a/.github/workflows/build-docker-image.yml +++ b/.github/workflows/build-docker-image.yml @@ -28,7 +28,7 @@ jobs: runs-on: ubuntu-latest services: verdaccio: - image: verdaccio/verdaccio:latest + image: verdaccio/verdaccio:5 ports: - 4873:4873 steps: diff --git a/.github/workflows/build-pro-image.yml b/.github/workflows/build-pro-image.yml index a9b4670d83..5c7ecbbe28 100644 --- a/.github/workflows/build-pro-image.yml +++ b/.github/workflows/build-pro-image.yml @@ -20,7 +20,7 @@ jobs: runs-on: ubuntu-latest services: verdaccio: - image: verdaccio/verdaccio:latest + image: verdaccio/verdaccio:5 ports: - 4873:4873 steps: diff --git a/Dockerfile b/Dockerfile index b9a40648b8..d24a41aec4 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM node:18-bullseye as builder +FROM node:20-bullseye as builder ARG VERDACCIO_URL=http://host.docker.internal:10104/ ARG COMMIT_HASH ARG APPEND_PRESET_LOCAL_PLUGINS @@ -7,10 +7,12 @@ ARG PLUGINS_DIRS ENV PLUGINS_DIRS=${PLUGINS_DIRS} + +RUN npx npm-cli-adduser --username test --password test -e test@nocobase.com -r $VERDACCIO_URL + RUN apt-get update && apt-get install -y jq WORKDIR /tmp COPY . /tmp -RUN npx npm-cli-adduser --username test --password test -e test@nocobase.com -r $VERDACCIO_URL RUN cd /tmp && \ NEWVERSION="$(cat lerna.json | jq '.version' | tr -d '"').$(date +'%Y%m%d%H%M%S')" \ && tmp=$(mktemp) \ @@ -41,7 +43,7 @@ RUN cd /app \ && tar -zcf ./nocobase.tar.gz -C /app/my-nocobase-app . -FROM node:18-bullseye-slim +FROM node:20-bullseye-slim RUN apt-get update && apt-get install -y nginx RUN rm -rf /etc/nginx/sites-enabled/default COPY ./docker/nocobase/nocobase.conf /etc/nginx/sites-enabled/nocobase.conf