2

I have seriously tried every command I can find on the web to open a exited console and interact with it, and none of them work. I'm trying to revive a docker container where I previously compiled a kernel. Please tell me what I am doing wrong.

Here is what I have tried:

root@M14EBR:~# docker exec -it a5416008966b /bin/bash
Error response from daemon: Container a5416008966b9cbe24cd91b529541536b5342bfe5c49052d12983771c569f7a5 is not running.

root@M14EBR:~# docker start -a -i `docker ps -q -l`
"docker ps -a" still shows all containers exited

root@M14EBR:~# docker run -i a5416008966b /bin/bash
Unable to find image 'a5416008966b:latest' locally
docker: Error response from daemon: pull access denied for a5416008966b,repository does not exist or may require 'docker login'.
See 'docker run --help'.


root@M14EBR:~# docker start ee86103a86d2
ee86103a86d2
root@M14EBR:~# docker ps -a
ee86103a86d2        debian              "/bin/bash"         13 hours ago        Exited (0) 5 seconds ago
1

1 Answer 1

1

You need to see what the start up logs for this container report:

docker logs <container id>

where <container id> is shown in docker ps -a.

$ docker ps -a
CONTAINER ID        IMAGE               COMMAND                  CREATED              STATUS                          PORTS               NAMES
4c3ae992631c        sysdig/sysdig       "/docker-entrypoin..."   About a minute ago   Exited (0) About a minute ago                       sysdig

$ docker logs 4c3ae992631c
* Setting up /usr/src links from host
* Unloading sysdig-probe, if present
rmmod: ERROR: Module sysdig_probe is not currently loaded
* Running dkms install for sysdig
Error! echo
Your kernel headers for kernel 3.10.0-693.21.1.el7.x86_64 cannot be found at
/lib/modules/3.10.0-693.21.1.el7.x86_64/build or /lib/modules/3.10.0-693.21.1.el7.x86_64/source.
* Trying to load a system sysdig-probe, if present
* Trying to find precompiled sysdig-probe for 3.10.0-693.21.1.el7.x86_64
Found kernel config at /host/boot/config-3.10.0-693.21.1.el7.x86_64
* Trying to download precompiled module from https://s3.amazonaws.com/download.draios.com/stable/sysdig-probe-binaries/sysdig-probe-0.21.0-x86_64-3.10.0-693.21.1.el7.x86_64-9df7f67292ca873f1d3b016b35438cfb.ko
Download failed, consider compiling your own sysdig-probe and loading it or getting in touch with the sysdig community
root@4c3ae992631c:/# exit
exit

Since this container is "Exited" you can start it back up like so:

$ docker ps -a
CONTAINER ID        IMAGE               COMMAND                  CREATED             STATUS                     PORTS               NAMES
4c3ae992631c        sysdig/sysdig       "/docker-entrypoin..."   3 minutes ago       Exited (0) 3 minutes ago                       sysdig

$ docker start 4c3ae992631c
4c3ae992631c

$ docker ps -a
CONTAINER ID        IMAGE               COMMAND                  CREATED             STATUS              PORTS               NAMES
4c3ae992631c        sysdig/sysdig       "/docker-entrypoin..."   3 minutes ago       Up 4 seconds                            sysdig

Registry login

Based on your update to your question, this message would seem to be your issue:

docker: Error response from daemon: pull access denied for a5416008966b,repository does not exist or may require 'docker login'. See 'docker run --help'.

So either the registry requires you to docker login with your registry/hub account, or the image your container was based on is no longer available on the docker registry.

2
  • When i try this, it immediately still comes back as exited, and i never get a chance to attach to it. I added the results to the end as an update.
    – TrevorKS
    Jul 7, 2018 at 15:06
  • @TrevorKS - it's stating you need to do a docker login to access the docker registry. I'd start with that.
    – slm
    Jul 7, 2018 at 15:15

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .