Portainer: Can not access to container console

Created on 2 Aug 2018  ·  3Comments  ·  Source: portainer/portainer

Question:
How can I access to container console?

when I try to exec login with this container , it is always show me the wrong info below,
docker exec -it b2d76b3d56c8 /bin/bash
oci runtime error: exec failed: container_linux.go:265: starting container process caused "exec: \"/bin/bash\": stat /bin/bash: no such file or directory"

I want to exec into the container and add CA files and run the command " sudo /usr/sbin/update-ca-certificates"

thanks ~

kinquestion

Most helpful comment

Also, some docker images only have /bin/sh, but not /bin/bash. You need to choose shell first (command combo box).

All 3 comments

The Portainer docker image is based on scratch (actually portainer/base), there is no way to exec into this container.

If you want to achieve something similar, you'll need to build your own image based on something else like alpine for example.

Why do you need to execute this command? We already bundle the certs in the image, but might need to refresh it (https://github.com/portainer/docker-images/blob/master/base/Dockerfile).

@deviantony got it , thanks so much for the comment ~ let's me close this case now .

Also, some docker images only have /bin/sh, but not /bin/bash. You need to choose shell first (command combo box).

Was this page helpful?
0 / 5 - 0 ratings