fix: verdaccio/verdaccio:5 (#4448)

* fix: verdaccio/verdaccio:5

* fix: adduser error

* fix: build

* chore: docker node version

---------

Co-authored-by: Chareice <chareice@live.com>
This commit is contained in:
chenos 2024-05-22 13:28:45 +08:00 committed by GitHub
parent d6d3cac0eb
commit e922aa3534
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 7 additions and 5 deletions

View File

@ -28,7 +28,7 @@ jobs:
runs-on: ubuntu-latest
services:
verdaccio:
image: verdaccio/verdaccio:latest
image: verdaccio/verdaccio:5
ports:
- 4873:4873
steps:

View File

@ -20,7 +20,7 @@ jobs:
runs-on: ubuntu-latest
services:
verdaccio:
image: verdaccio/verdaccio:latest
image: verdaccio/verdaccio:5
ports:
- 4873:4873
steps:

View File

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