nf-core / nf-core/tools

Using the nfcore/tools docker image gets permission denied now

Open
#2,944 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
Python
Stars
322
Forks
255
Avg merge
2d 3h
Merged PRs (30d)
5

Description

Description of the bug

I'm using the docker image nfcore/tools to develop my pipelines and run schema build, but lately I am getting a permission denied issue when running the docker version.

Command used and terminal output
docker run -itv `pwd`:`pwd` -w `pwd` -u $(id -u):$(id -g) nfcore/tools
Unable to find image 'nfcore/tools:latest' locally
latest: Pulling from nfcore/tools
e1caac4eb9d2: Pull complete 
51d1f07906b7: Pull complete 
fe87ad6b112e: Pull complete 
4d8ccb72bbad: Pull complete 
8100581c78dd: Pull complete 
7bfcabf371be: Pull complete 
ffe7d43d52f3: Pull complete 
4cf8394fe5e8: Pull complete 
4a9ae2a4dd52: Pull complete 
131ad79d069d: Pull complete 
40be4339f485: Pull complete 
70a19b5b9798: Pull complete 
08030602159c: Pull complete 
4f4fb700ef54: Pull complete 
ec15d696e163: Pull complete 
Digest: sha256:bf01e0890530576a543885d348642901e4b6252d9029108c8552fd6502e4b4de
Status: Downloaded newer image for nfcore/tools:latest
Could not create cache directory: /.cache/nfcore/cache_3.11.8
Traceback (most recent call last):
  File "/usr/local/bin/nf-core", line 5, in <module>
    from nf_core.__main__ import run_nf_core
  File "/usr/local/lib/python3.11/site-packages/nf_core/__main__.py", line 26, in <module>
    setup_nfcore_dir()
  File "/usr/local/lib/python3.11/site-packages/nf_core/utils.py", line 340, in setup_nfcore_dir
    os.makedirs(NFCORE_DIR)
  File "<frozen os>", line 215, in makedirs
  File "<frozen os>", line 225, in makedirs
PermissionError: [Errno 13] Permission denied: '/.config'
System information

Nextflow verison 23.10.1
Docker version 24.0.6, build ed223bc

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the issue with the reported docker run command and inspect how the nfcore/tools image configures the container user, home, cache, and config paths. Use the traceback through /usr/local/lib/python3.11/site-packages/nf_core/main.py and utils.py as the entry point; done means the command works with the supplied host UID and GID without permission errors.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, python
Domain
cli, devops
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.