Command not recognized via SSH but with docker exec
by undefineduser from LinuxQuestions.org on (#4VSSE)
Hello,
i'm working with the golang:stretch (Debian Stretch with GO) docker container and wanted to connect directly on the docker container via SSH as root, which worked.
But the go command was not recognized.
When I connect to the container via
" docker exec -ti golang-container bash ", I am also logged in as root and it recognizes the go command. But if I log on to the container with another user, and then as root, he doesn't recognize the go command either.
Could someone tell me why?


i'm working with the golang:stretch (Debian Stretch with GO) docker container and wanted to connect directly on the docker container via SSH as root, which worked.
But the go command was not recognized.
When I connect to the container via
" docker exec -ti golang-container bash ", I am also logged in as root and it recognizes the go command. But if I log on to the container with another user, and then as root, he doesn't recognize the go command either.
Could someone tell me why?