question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Docker upgrade to 4.0.0 not working, missing all packages

See original GitHub issue

Describe the bug Docker upgrade to 4.0.0 not working, missing all packages. The UI did not show any packages and also install a package did not work

To Reproduce Steps to reproduce the behavior:

  1. Go to Update the docker image to verdaccio/verdaccio:4.0.0
  2. Open the website
  3. No packages available

Expected behavior See all NPM packages

Kubernetes (please complete the following information):

  • Docker verdaccio tag: verdaccio/verdaccio:4.0.0

Configuration File (cat ~/.config/verdaccio/config.yaml) $ cat /verdaccio/conf/config.yaml

storage: /verdaccio/storage/
max_body_size: 1000mb
auth:
  htpasswd:
    file: ./htpasswd
uplinks:
  npmjs:
    url: https://registry.npmjs.org/
packages:
  '@*/*':
    access: $all
    publish: $authenticated
    proxy:
    storage: '/verdaccio/storage'
  '**':
    access: $all
    publish: $authenticated
    proxy:
    storage: '/verdaccio/storage'
logs:
  - {type: stdout, format: pretty, level: debug}
#  - {type: stdout, format: pretty, level: http}


security:
   token:
      web: 24h # by default
      api: never # by defaukt
   algorithm: HS256 # by default

Additional context Spoke on Discord and got these links: https://verdaccio.org/blog/2019/02/24/migrating-verdaccio and https://verdaccio.org/blog/2019/05/13/the-new-docker-image-verdaccio-4

None where clear to me what the changes are, I use kubernetes with no ENV variables and separate volume mounts. What are the real breaking changes?

---

apiVersion: apps/v1
kind: Deployment
metadata:
  labels:
    app: npm-registry
  namespace: backoffice
  name: npm-registry
spec:
  # Stop old container before starting new one
  strategy:
    type: Recreate
    rollingUpdate: null
  selector:
    matchLabels:
      app: npm-registry
  replicas: 1
  template:
    metadata:
      labels:
        app: npm-registry
    spec:
      containers:
      - name: npm-registry
        image: verdaccio/verdaccio:4.0.0
        imagePullPolicy: Always
        resources:
          requests:
            cpu: 300m
            memory: 200Mi
          limits:
            cpu: 300m
            memory: 250Mi
        ports:
        - containerPort: 4873
          name: http
        volumeMounts:
        - mountPath: /verdaccio/storage
          name: npmdata-rook-ceph-block
          subPath: storage
        - mountPath: /verdaccio/plugins
          name: npmdata-rook-ceph-block
          subPath: plugins
        - mountPath: /verdaccio/conf
          name: npmdata-rook-ceph-block
          subPath: conf
        readinessProbe:
          httpGet:
            path: /
            port: 4873
          initialDelaySeconds: 5
          periodSeconds: 20
        livenessProbe:
          httpGet:
            path: /
            port: 4873
          timeoutSeconds: 2
      volumes:
      - name: npmdata-rook-ceph-block
        persistentVolumeClaim:
          claimName: npmdata-rook-ceph-block

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:6
  • Comments:27 (6 by maintainers)

github_iconTop GitHub Comments

3reactions
dlouzancommented, Jun 12, 2019

@johnruck Ok please try this:

Please test creating a named volume and copying the contents of your storage directory in the host to it. Then start your verdaccio referencing this volume.

PLEASE backup your storage directory before trying this, just in case, it shouldn’t break anything but you never know.

# Create a docker volume for storage
docker volume create verdaccio-storage

# Run a temp container to mount your local storage directory
# Copy the storage to the named volume
docker run -it --rm -v verdaccio-storage:/verdaccio/storage -v /home/john/verdaccio4/storage:/backup ubuntu bash -c "cp -a /backup/. /verdaccio/storage"

# Start your verdaccio referencing the volume
docker run -d --rm -it -v /home/john/verdaccio4/conf:/verdaccio/conf -v verdaccio-storage:/verdaccio/storage -v /home/john/verdaccio4/plugins:/verdaccio/plugins -p 4873:4873 --name npm-server verdaccio/verdaccio
3reactions
johnruckcommented, Jul 24, 2019

Work around did not work for me as well (I was also already doing 3 independent volume mounts. I have also just tried new mount directories with no effect. One thing I have noticed is that I think it might be permissions on the mount directories that is the problem (for point of reference, I let Docker create the new directories and then copied in the config.yaml file after it created them). Attaching the docker instance gets me the following output on the new directories on my first attempt to use the “new” server.

 http --> 200, req: 'GET https://registry.npmjs.org/@angular%2Fcli' (streaming)
 http --> 200, req: 'GET https://registry.npmjs.org/@types%2Fjasmine' (streaming)
 http --> 200, req: 'GET https://registry.npmjs.org/@angular%2Fcli', bytes: 0/1414339
 error--- unexpected error: EACCES: permission denied, mkdir '/verdaccio/storage/@angular'
Error: EACCES: permission denied, mkdir '/verdaccio/storage/@angular'
 http <-- 500, user: null(172.16.121.185), req: 'GET /@angular%2fcli', error: internal server error
 http --> 200, req: 'GET https://registry.npmjs.org/@types%2Fjasmine', bytes: 0/133927
 error--- unexpected error: EACCES: permission denied, mkdir '/verdaccio/storage/@types'
Error: EACCES: permission denied, mkdir '/verdaccio/storage/@types'

note this is with the “Latest” docker image. Verdaccio web ui says version 4.01.

Any suggestions? I have even tried turning off the caching and it still outputs these errors and fails.

In case it matters - this was on Ubuntu 18.04.2 LTS

command used:

docker run -d --rm -it -v /home/john/verdaccio4/conf:/verdaccio/conf -v /home/john/verdaccio4/storage:/verdaccio/storage -v /home/john/verdaccio4/plugins:/verdaccio/plugins -p 4873:4873 --name npm-server verdaccio/verdaccio

image info
verdaccio/verdaccio                latest              d13802d13b71        2 weeks ago         116MB
Read more comments on GitHub >

github_iconTop Results From Across the Web

Docker Desktop release notes - Docker Documentation
This page contains information about the new features, improvements, known issues, and bug fixes in Docker Desktop releases. Note. The information below is ......
Read more >
python - How to resolve missing dependencies in Docker Alpine
With a bit of work, hopefully you should be able to find corresponding packages for the remaining dependencies. Good luck!
Read more >
Installing OCRmyPDF - Read the Docs
The standard Docker image, archlinux/base:latest , does not have a non-root user ... Install or upgrade the required Homebrew packages, if any are...
Read more >
Apache Karaf Container 4.x - Documentation
The data folder contains all the working and temporary files for Karaf. ... Creating missing directory: /opt/apache-karaf-4.0.0/lib/wrapper Creating file: ...
Read more >
Container permission denied: How to diagnose this error
If your container runs with the --privileged flag, the problem is ... If a container runs with Docker but not Podman, try adding...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found