0
Fork 0
mirror of https://github.com/verdaccio/verdaccio.git synced 2025-01-20 22:52:46 -05:00

fix(docker): remove yarn symlinks (#3840)

The [`node:alpine` Docker image][1] adds some symlinks to `yarn` in
`/usr/local/bin/`. These should be removed as part of removing `yarn`
from the Verdaccio Docker image, otherwise there will be errors when
a someone tries to re-install `yarn` in their Docker image that builds
on top of the Verdaccio one.

[1]: 02a64a08a9/18/alpine3.16/Dockerfile (L91-L92)
This commit is contained in:
George Kalpakas 2023-05-30 15:53:42 +03:00 committed by GitHub
parent c5afdbbb0c
commit 1a5d5b41d5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -59,7 +59,8 @@ RUN npm install -g $VERDACCIO_APPDIR/verdaccio.tgz \
&& rm -Rf .npm/ \
&& rm $VERDACCIO_APPDIR/verdaccio.tgz \
# yarn is not need it after this step
&& rm -Rf /opt/yarn-v1.22.19/
# Also remove the symlinks added in the [`node:alpine` Docker image](https://github.com/nodejs/docker-node/blob/02a64a08a98a472c6141cd583d2e9fc47bcd9bfd/18/alpine3.16/Dockerfile#L91-L92).
&& rm -Rf /opt/yarn-v1.22.19/ /usr/local/bin/yarn /usr/local/bin/yarnpkg
ADD conf/docker.yaml /verdaccio/conf/config.yaml
ADD docker-bin $VERDACCIO_APPDIR/docker-bin