how to ssh docker container

Ciasto piekarz :

I am running the container hypriot/rpi-busybox-httpd

I am trying to ssh to docker container: but it is giving error :

pi@raspberrypi:~ $ docker exec -it cc55da85b915 bash
rpc error: code = 2 desc = oci runtime error: exec failed: container_linux.go:247: starting container process caused "exec: \"bash\": executable file not found in $PATH"

pi@raspberrypi:~ $ docker exec -it cc55da85b915 sh
rpc error: code = 2 desc = oci runtime error: exec failed: container_linux.go:247: starting container process caused "exec: \"sh\": executable file not found in $PATH"

am I doing the right away ?

Esteban Collado :

It could be your image does not have the binary /bin/bash installed (as suggested before), I had the same problem and I was able to enter into the container using /bin/sh

docker exec -ti cc55da85b915 /bin/sh

Another workaround could be execute directly the commands without get access to any shell.

docker exec -ti cc55da85b915 ls /etc

この記事はインターネットから収集されたものであり、転載の際にはソースを示してください。

侵害の場合は、連絡してください[email protected]

編集
0

コメントを追加

0

関連記事

分類Dev

how to ssh docker container

分類Dev

how to ssh docker container

分類Dev

How to forward SSH into GitLab Docker container based on requested domain

分類Dev

How to reverse SSH tunnel to remote docker container for Xdebug?

分類Dev

SSH reverse tunnel into Docker container

分類Dev

SSH Agent forwarding inside docker compose container

分類Dev

Docker. Can't start docker container with ssh command

分類Dev

How to add a docker container to an existing docker network

分類Dev

Docker, How to get a container IP inside another container in PHP?

分類Dev

How to run a cron job inside a docker container?

分類Dev

How to mount volume from container to host in Docker?

分類Dev

How to have root permission in the Grafana Docker container?

分類Dev

How to connect nodeJS docker container to mongoDB

分類Dev

How to redirect command output from docker container

分類Dev

How to access Docker container app on local?

分類Dev

How to enable yum repo inside a docker container

分類Dev

How to authenticate Docker container with Google Service

分類Dev

How to delete postgres database within docker container

分類Dev

How to install homebrew on Ubuntu inside Docker container

分類Dev

How to make a docker container communicate with the localstack docker container with docker-compose?

分類Dev

How to ssh into docker-machine VirtualBox instance?

分類Dev

Docker context how to use specific ssh key

分類Dev

docker for windows how to access docker daemon from container

分類Dev

How to stop Docker process from docker hub container busybox?

分類Dev

how to connect volume to docker container in docker-compose

分類Dev

ssh-agent does not remember identities when running inside a docker container in DC/OS

分類Dev

How to execute a script when I terminate a docker container

分類Dev

How to keep Docker container running after starting services?

分類Dev

How to create docker container with custom root volume size?

Related 関連記事

  1. 1

    how to ssh docker container

  2. 2

    how to ssh docker container

  3. 3

    How to forward SSH into GitLab Docker container based on requested domain

  4. 4

    How to reverse SSH tunnel to remote docker container for Xdebug?

  5. 5

    SSH reverse tunnel into Docker container

  6. 6

    SSH Agent forwarding inside docker compose container

  7. 7

    Docker. Can't start docker container with ssh command

  8. 8

    How to add a docker container to an existing docker network

  9. 9

    Docker, How to get a container IP inside another container in PHP?

  10. 10

    How to run a cron job inside a docker container?

  11. 11

    How to mount volume from container to host in Docker?

  12. 12

    How to have root permission in the Grafana Docker container?

  13. 13

    How to connect nodeJS docker container to mongoDB

  14. 14

    How to redirect command output from docker container

  15. 15

    How to access Docker container app on local?

  16. 16

    How to enable yum repo inside a docker container

  17. 17

    How to authenticate Docker container with Google Service

  18. 18

    How to delete postgres database within docker container

  19. 19

    How to install homebrew on Ubuntu inside Docker container

  20. 20

    How to make a docker container communicate with the localstack docker container with docker-compose?

  21. 21

    How to ssh into docker-machine VirtualBox instance?

  22. 22

    Docker context how to use specific ssh key

  23. 23

    docker for windows how to access docker daemon from container

  24. 24

    How to stop Docker process from docker hub container busybox?

  25. 25

    how to connect volume to docker container in docker-compose

  26. 26

    ssh-agent does not remember identities when running inside a docker container in DC/OS

  27. 27

    How to execute a script when I terminate a docker container

  28. 28

    How to keep Docker container running after starting services?

  29. 29

    How to create docker container with custom root volume size?

ホットタグ

アーカイブ