Search code examples
dockercoreoshashicorp-vault

Cannot bash into Vault Server Docker container


I have been trying to setup Vault by Harshicorp in server mode via its official docker image. Though the vault server is successfully started I cannot bash into the Vault docker container and even cannot interact. I've used the same docker run command given on the official documentation.

Running docker logs to the container only gives the following output.

==> Vault server configuration:

                     Cgo: disabled
               Log Level: info
                   Mlock: supported: true, enabled: true
                 Storage: file
                 Version: Vault v0.8.3
             Version Sha: 6b29fb2b7f70ed538ee2b3c057335d706b6d4e36

==> Vault server started! Log data will stream in below:

When trying to bash into the docker vault container, I get the following output,

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"

Couldn't find any thing directing to an issue like this. Is this a known issue and I want to know, what am I doing wrong here?

Note - My Environment is a AWS CoreOS instance.


Solution

  • Vault looks based on alpine:3.6 this means you do not have bash but sh as shell.

    docker exec -it CONTAINER sh should do the Job