Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

627
Vistas
how to ssh docker container

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 ?

over 4 years ago · Santiago Trujillo
3 Respuestas
Responde la pregunta

0

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
over 4 years ago · Santiago Trujillo Denunciar

0

The image you're using seems that it doesn't have the binary /bin/bash installed but it should have /bin/sh

Try:

docker exec -it cc55da85b915 sh
over 4 years ago · Santiago Trujillo Denunciar

0

You have many different ways to do that, you can attach using docker's attach command.

$ sudo docker attach cc55da85b915 #by ID

Or you can use docker exec command:

$ sudo docker exec -i -t cc55da85b915 /bin/bash

If /bin/bash fails, you can use /bin/sh that works in more containers:

$ sudo docker exec -i -t cc55da85b915 /bin/sh
over 4 years ago · Santiago Trujillo Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda