<#22519 Permission denied (os error 13) building D...
# github-notifications
c
#22519 Permission denied (os error 13) building Docker Issue created by sergeykad Describe the bug Running "pants package myproject:docker" results in a permission error. If I run any Docker commands directly (e.g.
docker build .
), there are no issues. Pants version 2.27 OS Ubuntu 22.04 Additional info BUILD
Copy code
docker_image(
    name="docker",
)

python_requirements(
    name="reqs",
    source="pyproject.toml",
)
``` pants --print-stacktrace -ldebug package myproject:docker [2025-07-21T133209Z DEBUG pantsd] Looking for pantsd metadata in /home/user/IdeaProjects/analytics/.pants.d/pids as specified by [GLOBAL] pants_subprocessdir = .pants.d/pids via Default. [2025-07-21T133209Z DEBUG pantsd] Parsed port 41109 from /home/user/IdeaProjects/analytics/.pants.d/pids/278be61e79f6/pantsd/socket. 163210.17 [DEBUG] acquiring lock: <pants.pantsd.lock.OwnerPrintingInterProcessFileLock object at 0x7aa9a76bfc10> 163210.17 [DEBUG] terminating pantsd 163210.17 [DEBUG] sending signal 15 to pid 64400 163210.27 [DEBUG] successfully terminated pid 64400 163210.27 [DEBUG] purging metadata directory: /home/user/IdeaProjects/analytics/.pants.d/pids/278be61e79f6/pantsd 163210.27 [DEBUG] Launching pantsd 163210.27 [DEBUG] purging metadata directory: /home/user/IdeaProjects/analytics/.pants.d/pids/278be61e79f6/pantsd 163210.28 [DEBUG] pantsd command is: PANTS_DAEMON_ENTRYPOINT=pants.pantsd.pants_daemon:launch_new_pantsd_instance PYTHONPATH=/home/user/.cache/nce/5c54a0c25255df2afb0525da856d49eb81b48cff0e32a9c868f77a296af24319/bindings/venvs/2.27.0/bin/home/user/.cache/nce/4dd2c710a828c8cfff384e0549141016a563a5e153d2819a7225ccc05a1a17c7/cpython 3.11.13+20250612 x86 64 unknown linux gnu install only.tar.gz/python/lib/python311.zip/home/user/.cache/nce/4dd2c710a828c8cfff384e0549141016a563a5e153d2819a7225ccc05a1a17c7/cpython-3.11.13+20250612-x86_64-unknown-linux-gnu-install_only.tar.gz/python/lib/python3.11/home/user/.cache/nce/4dd2c710a828c8cfff384e0549141016a563a5e153d2819a7225ccc05a1a17c7/cpython 3.11.13+20250612 x86 64 unknown linux gnu install only.tar.gz/python/lib/python3.11/lib dynload/home/user/.cache/nce/5c54a0c25255df2afb0525da856d49eb81b48cff0e32a9c868f77a296af24319/bindings/venvs/2.27.0/lib/python3.11/site-packages /home/user/.cache/nce/5c54a0c25255df2afb0525da856d49eb81b48cff0e32a9c868f77a296af24319/bindings/venvs/2.27.0/bin/python3.11 /home/user/.cache/nce/5c54a0c25255df2afb0525da856d49eb81b48cff0e32a9c868f77a296af24319/bindings/venvs/2.27.0/bin/pants --print-stacktrace -ldebug package myproject:docker 163212.68 [DEBUG] pantsd is running at pid 66871, pailgun port is 34489 163212.68 [DEBUG] releasing lock: <pants.pantsd.lock.OwnerPrintingInterProcessFileLock object at 0x7aa9a76bfc10> 163212.68 [DEBUG] Connecting to pantsd on port 34489 163212.68 [DEBUG] Connecting to pantsd on port 34489 attempt 1/3 163212.68 [DEBUG] Connected to pantsd 163212.68 [DEBUG] work dir: /home/user/IdeaProjects/analytics 163212.68 [DEBUG] Found BuildRoot("/home/user/IdeaProjects/analytics") starting search from /home/user/IdeaProjects/analytics. 163212.69 [DEBUG] Launching 1 roots (poll=false). 163212.69 [DEBUG] Found BuildRoot("/home/user/IdeaProjects/analytics") starting search from /home/user/IdeaProjects/analytics. 163212.70 [DEBUG] computed 1 nodes in 0.009718 seconds. there are 10 total nodes. 163212.70 [DEBUG] Launching 1 roots (poll=false). 163212.70 [DEBUG] computed 1 nodes in 0.000305 seconds. there are 14 total nodes. 163212.83 [DEBUG] Found BuildRoot("/home/user/IdeaProjects/analytics") starting search from /home/user/IdeaProjects/analytics. 163212.84 [INFO] Initializing scheduler... 163212.86 [DEBUG] File handle limit is: 1048576 163212.87 [DEBUG] No sandboxer configured. 163212.87 [DEBUG] Initializing Nailgun pool for 32 processes... 163212.87 [DEBUG] Using [cache::CommandRunner { inner: bounded::CommandRunner { inner: SwitchedCommandRunner { .. }, .. }, .. }, cache::CommandRunner { inner: bounded::CommandRunner { inner: SwitchedCommandRunner { .. }, .. }, .. }] for process execution. 163212.87 [DEBUG] Rule graph: building... 163212.87 [DEBUG] Rule graph: validating rule IDs... 163212.87 [DEBUG] Rule graph: building initial polymorphic graph... 163213.16 [DEBUG] Rule graph: labelling live variables... 163213.23 [DEBUG] Rule graph: monomophizing graph... 163214.36 [DEBUG] Rule graph: pruning edges... 163214.40 [DEBUG] Rule graph: finalizing... 163214.41 [DEBUG] Rule graph: built in 1.539s 163214.41 [DEBUG] Changes to /home/user/.cache/nce/5c54a0c25255df2afb0525da856d49eb81b48cff0e32a9c868f77a296af24319/bindings/venvs/2.27.0/bin, outside of the buildroot, will not be invalidated. 163214.41 [DEBUG] Changes to /home/user/.cache/nce/5c54a0c25255df2afb0525da856d49eb81b48cff0e32a9c868f77a296af24319/bindings/venvs/2.27.0/bin, outside of the buildroot, will not be invalidated. 163214.41 [DEBUG] Changes to /home/user/.cache/nce/4dd2c710a828c8cfff384e0549141016a563a5e153d2819a7225ccc05a1a17c7/cpython-3.11.13+20250612-x86_64-unknown-linux-gnu-install_only.tar.gz/python/lib/python311.zip, outside of the buildroot, will not be invalidated. 163214.41 [DEBUG] Changes to /home/user/.cache/nce/4dd2c710a828c8cfff384e0549141016a563a5e153d2819a7225ccc05a1a17c7/cpython-3.11.13+20250612-x86_64-unknown-linux-gnu-install_only.tar.gz/python/lib/python3.11, outside of the buildroot, will not be invalidated. 163214.41 [DEBUG] Changes to /home/user/.cache/nce/4dd2c710a828c8cfff384e0549141016a563a5e153d2819a7225ccc05a1a17c7/cpython-3.11.13+20250612-x86_64-unknown-linux-gnu-install_only.tar.gz/python/lib/python3.11/lib-dynload, outside of the buildroot, will not be invalidated. 163214.41 [DEBUG] Changes to /home/user/.cache/nce/5c54a0c25255df2afb0525da856d49eb81b48cff0e32a9c868f77a296af24319/bindings/venvs/2.27.0/lib/python3.11/site-packages, outside of the buildroot, will not be invalidated. 163214.41 [DEBUG] setting up service <pants.pantsd.service.scheduler_service.SchedulerService object at 0x7aadc7f48c10> 163214.41 [DEBUG] setting up service <pants.pantsd.service.store_gc_service.StoreGCService object at 0x7aada59161d0> 163214.41 [DEBUG] starting service <pants.pantsd.service.scheduler_service.SchedulerService object at 0x7aadc7f48c10> 163214.41 [DEBUG] starting service <pants.pantsd.service.store_gc_service.StoreGCService object at 0x7aada59161d0> 163214.41 [INFO] Scheduler initialized. 163214.41 [DEBUG] Launching 1 roots (poll=false). 163214.42 [DEBUG] computed 1 nodes in 0.000233 seconds. there are 14 total nodes. 163214.42 [DEBUG] Launching 1 roots (poll=false). 163214.42 [DEBUG] computed 1 nodes in 0.000109 seconds. there are 14 total nodes. 163214.46 [DEBUG] specs are: Specs(includes=RawSpecs(description_of_origin='CLI arguments', address_literals=(AddressLiteralSpec(path_component='myproject', target_component='docker', generated_component=None, parameters=FrozenDict({})),), file_literals=(), file_globs=(), dir_literals=(), dir_globs=(), recursive_globs=(), ancestor_globs=(), unmatched_glob_behavior=<GlobMatchErrorBehavior.error: 'error'>, filter_by_global_options=True, from_change_detection=False), ignores=RawSpecs(description_of_origin='CLI arguments', address_literals=(), file_literals=(), file_globs=(), dir_literals=(), dir_globs=(), recursive_globs=(), ancestor_globs=(), unmatched_glob_behavior=<GlobMatchErrorBehavior.error: 'error'>, filter_by_global_options=False, from_change_detection=False)) 163214.46 [DEBUG] changed_options are: ChangedOptions(since=None, diffspec=None, dependents=<DependentsOption.NONE: 'none'>) 163214.46 [DEBUG] Launching 1 roots (poll=false). 163214.46 [DEBUG] Found BuildRoot("/home/user/IdeaProjects/analytics") starting search from /home/user/IdeaProjects/analytics. 163214.47 [DEBUG] computed 1 nodes in 0.010404 seconds. there are 17 total nodes. 163214.47 [DEBUG] Launching 1 roots (poll=false). 163214.47 [DEBUG] computed 1 nodes in 0.00044… pantsbuild/pants