Permission issue(exit code 126) while executing command in another container via go client for docker engine api #47782
Labels
kind/bug
Bugs are bugs. The cause may or may not be known at triage time so debugging may be needed.
status/0-triage
Description
I am trying to execute certain command inside of docker swarm containers from another go service. But when executing it, I am getting the exit code 126 while inspecting.
Here is the code used for reference
Reproduce
docker stack deploy
in the same directory as that of docker stack yml file.Expected behavior
It should be able to execute command, from docker engine api since they share the same overlay network and the caller service has access to docker daemon and is running as root. The same codebase works as expected for docker compose, but fails specifically for docker swarm when trying to run certain command inside of it.
docker version
Client: Docker Engine - Community Version: 26.0.1 API version: 1.45 Go version: go1.21.9 Git commit: d260a54 Built: Thu Apr 11 10:53:21 2024 OS/Arch: linux/amd64 Context: default Server: Docker Engine - Community Engine: Version: 26.0.1 API version: 1.45 (minimum version 1.24) Go version: go1.21.9 Git commit: ... Built: Thu Apr 11 10:53:21 2024 OS/Arch: linux/amd64 Experimental: false containerd: Version: 1.6.31 GitCommit: ... runc: Version: 1.1.12 GitCommit: ... docker-init: Version: 0.19.0 GitCommit: ...
docker info
Additional Info
No response
The text was updated successfully, but these errors were encountered: