Linux container docker exec -it container_id /bin/bash works on windows box but not on linux box

Hi,

I am trying to get a image/container up and running on a K8 cluster linux nodes. I am trying to diagnose the issue by trying to run

docker exec -it container_id /bin/bash

on a windows machine with docker in linux container mode, I get the bash shell and can explore inside the container.

on a centos7 machine (a node of the k8 cluster) I am NOT able to do

docker exec -it container_id /bin/bash

or

docker exec -it container_id /bin/sh

i get the error

rpc error: code = 2 desc = oci runtime error: exec failed: container_linux.go:235: starting container process caused “exec: “//bin//bash”: stat //bin//bash: no such file or directory”

any ideas?

Kubernetes itself gives a shi* about docker and what it brings to the table, actualy it’s happy with any CRI compliant container engine.

Why don’t you just use the tool intended for this purposes instead?
kubectl and its kubectl exec action.