how to ssh docker container

前端 未结 8 1646
抹茶落季
抹茶落季 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:44

    This will also relevant for Kubernetes pods.

    For example if you'll try to connect to a pod which doesn't contain the shell you specified:

    kubectl exec -it some-busybox-pod bash
    

    (busybox have sh on it not bash).

    You'll end up with the same error:

    OCI runtime exec failed: exec failed: container_linux.go:349: starting container process caused "exec: \"bash\": executable file not found in $PATH": unknown
    command terminated with exit code 126
    

提交回复
热议问题