how to ssh docker container

前端 未结 8 1621
抹茶落季
抹茶落季 2021-02-02 06:34

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

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

pi@raspberrypi:~ $         


        
8条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2021-02-02 06:51

    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
    

提交回复
热议问题