Permission issue(exit code 126) while executing command in another container via go client for docker engine api #47781
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
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
It works fine when running these services on docker compose and passing command to nginx container.
But fails with exit code of 126 when running the same command in docker swarm containers.
Is there some restriction that i am not aware of that blocks the access of swarm container through docker engine api. Both nginx service and golang service are running as root users, golang service has access to docker daemon and all the services are sharing the same overlay networks.
Beta Was this translation helpful? Give feedback.
All reactions