echoing-wall-19872
02/17/2024, 3:24 PM14:54:57.71 [DEBUG] computed 1 nodes in 0.323865 seconds. there are 1822 total nodes.
`364145457.71 [DEBUG] Canceled: Finding the tar binary - environment:linux_docker`
36514:54:57.71 [ERROR] 1 Exception encountered:
366Engine traceback:
367 in select
368 ..
369 in pants.core.goals.package.package_asset
`370 package goal`
371Traceback (most recent call last):
372 File "/root/.cache/nce/f60c448851c3b3112b179a56f168ee90d8597297cfc45d3ca7178c6715f6cba8/bindings/venvs/2.19.0/lib/python3.9/site-packages/pants/core/goals/package.py", line 165, in package_asset
373 packages = await MultiGet(
374 File "/root/.cache/nce/f60c448851c3b3112b179a56f168ee90d8597297cfc45d3ca7178c6715f6cba8/bindings/venvs/2.19.0/lib/python3.9/site-packages/pants/engine/internals/selectors.py", line 374, in MultiGet
375 return await _MultiGet(tuple(__arg0))
376 File "/root/.cache/nce/f60c448851c3b3112b179a56f168ee90d8597297cfc45d3ca7178c6715f6cba8/bindings/venvs/2.19.0/lib/python3.9/site-packages/pants/engine/internals/selectors.py", line 172, in __await__
377 result = yield self.gets
378native_engine.IntrinsicError: Failed to obtain version from local Docker: error trying to connect: No such file or directory (os error 2)
379nutritious-hair-72580
02/20/2024, 2:51 AMDOCKER_HOST to be passed through to Pants? https://www.pantsbuild.org/2.18/docs/docker#docker-configurationechoing-wall-19872
02/20/2024, 7:31 AM[docker]
build_args = ["USER", "HOME", "PATH", "GIT_COMMIT_SHA"]
tools = ["docker",]
env_vars = [
"DOCKER_HOST=<tcp://docker:2376>"
]
no luck same error ^_^echoing-wall-19872
02/20/2024, 7:41 AM/var/run/docker.sock. However, starting with Docker 19.03 and subsequent versions, the Docker daemon connection is managed automatically. This means there's no longer a requirement to mount the Docker socket into the client.
i can run native docker cmd in same job like docker info , docker pscurved-manchester-66006
02/20/2024, 7:39 PMechoing-wall-19872
02/20/2024, 7:47 PMechoing-wall-19872
02/20/2024, 7:48 PMcurved-manchester-66006
02/20/2024, 7:50 PMdocker info to the job before doing anything with Pants, does that work?echoing-wall-19872
02/20/2024, 7:51 PMechoing-wall-19872
02/20/2024, 7:53 PMcurved-manchester-66006
02/20/2024, 8:03 PMtar binary - environment:linux_docker`
Are you using environments?echoing-wall-19872
02/20/2024, 8:09 PMechoing-wall-19872
02/20/2024, 8:09 PM[environments-preview.names]
linux_docker = "//:python"curved-manchester-66006
02/20/2024, 8:15 PMDOCKER_HOST or https://github.com/pantsbuild/pants/issues/18915curved-manchester-66006
02/20/2024, 8:15 PMechoing-wall-19872
02/20/2024, 8:28 PMechoing-wall-19872
02/20/2024, 8:28 PMnutritious-hair-72580
04/04/2024, 1:24 AMadventurous-pillow-38958
09/25/2024, 12:33 PMERROR: Cannot connect to the Docker daemon at unix:///var/run/docker.socknutritious-hair-72580
09/25/2024, 11:09 PMDOCKER_HOST is added to the docker subsystem env vars so that the non-default value for gitlab (apparently DOCKER_HOST=<tcp://localhost:2375> ) is picked up.ancient-australia-38408
10/15/2024, 3:35 PMadventurous-pillow-38958
10/15/2024, 4:19 PMadventurous-pillow-38958
10/15/2024, 4:22 PMancient-australia-38408
10/15/2024, 11:32 PM# .gitlab-ci.yml
variables:
PANTS_CONFIG_FILES: "pants.ci.toml"
DOCKER_HOST: "<tcp://docker:2375>"
DOCKER_TLS_CERTDIR: ""
# pants.ci.toml
[docker]
tools = ["docker-credential-gcloud", "dirname", "readlink", "python3"]
env_vars = ["DOCKER_HOST=<tcp://docker:2375>", "DOCKER_TLS_CERTDIR=''"]stocky-greece-95214
05/25/2025, 8:00 AMpants.ci.toml file:
[docker]
env_vars = ["DOCKER_HOST=unix:///home/runner/var/run/docker.sock"]
However, the pants package command is failing with the following error:
2025-05-24T21:55:51.7662147Z Engine traceback:
2025-05-24T21:55:51.7662412Z in `package` goal
2025-05-24T21:55:51.7662568Z
2025-05-24T21:55:51.7662949Z ProcessExecutionFailure: Process 'Building docker image docker-dev:latest' failed with exit code 1.
2025-05-24T21:55:51.7663528Z stdout:
2025-05-24T21:55:51.7663653Z
2025-05-24T21:55:51.7663763Z stderr:
2025-05-24T21:55:51.7664221Z ERROR: Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
Interestingly, I don't see any reference to my custom settings in the logs. I expected DOCKER_HOST to be mentioned in the environment variables under:
spawned local process as Some(18479) for Process { argv: ["/usr/bin/docker", "buildx", "build", "--output=type=docker", "--pull=False", "--tag", "docker-dev:latest", "--file", "src/python/apps/ml_gateway/Dockerfile.docker-dev", "."], env: {"PATH": "/tmp/pants-sandbox-HrsgbT/_binary_shims_8f03118fb0b8f813fc0212ed7e946ef3cc99a30a46e3e2069b4fad2f63eb3882", "__UPSTREAM_IMAGE_IDS": ""}, ... execution_environment: ProcessExecutionEnvironment { name: Some("local_linux"), platform: Linux_x86_64, strategy: Local }, remote_cache_speculation_delay: 0ns, attempt: 0 }
Any guidance on how to further investigate this issue would be greatly appreciated!
Thank you!