Unable to do bash into influxDB docker container

$ sudo docker exec -it cf885f075056 /bin/bash
rpc error: code = 13 desc = invalid header field value “oci runtime error: exec failed: container_linux.go:247: starting container process caused “exec: \”/bin/bash\”: stat /bin/bash: no such file or directory"\n"

Any suggestions ?


I use influxdb:1.2-alpine docker image and i see that it is FROM buildpack-deps:jessie-curl which is inherited from FROM debian:jessie. Hence it is a linux image

As @Deepak_Jain said there are different version of the InfluxDB image in Docker Hub.
Can you provide to us the pull command that you are using? Or better the image id?

I tried now with the influxdb:latest and as you can see bash works fine.

docker run -it --rm influxdb /bin/bash
root@862f91215b02:/# uname -a
Linux 862f91215b02 4.11.0-041100-generic #201705041534 SMP Thu May 4 19:36:05 UTC 2017 x86_64 GNU/Linux

If you are using alpine, it doesn’t have bash by default. You should use sh

10:07 $ docker run -it --rm influxdb:1.3.5-alpine /bin/sh
Unable to find image 'influxdb:1.3.5-alpine' locally
1.3.5-alpine: Pulling from library/influxdb
019300c8a437: Already exists
c6f86ea3a05b: Pull complete
d8923a00959f: Pull complete
78fdc84a9d17: Pull complete
b515c90d6329: Pull complete
01073db30737: Pull complete
0eb3b09947be: Pull complete
Digest: sha256:969bcc2b5cdedab8651fce0d9721f7d13d88e440c8ac5c3a0eb9d8895ac8499e
Status: Downloaded newer image for influxdb:1.3.5-alpine
/ # uname -a
Linux 0ab66982684f 4.11.0-041100-generic #201705041534 SMP Thu May 4 19:36:05 UTC 2017 x86_64 Linux

To have a better understanding we need to know what image you are using.

I solved this by using