Search code examples
dockerdocker-container

Can't get my Docker Container to start and give me a shell


I am trying to get a Docker Container running. I am following this guide: http://opendata.cern.ch/docs/cms-guide-docker. The container refuses to start and give me access to the shall I expect.

Running the following command (as mentioned in the guide) does nothing, the process exits with a non-0 exit code. The first time I ran it, it downloaded the container image but did not land me into the sell as the guide says it would.

$ docker run --name opendata-2010 -it cmsopendata/cmssw_4_2_8 /bin/bash

I can see the container, it exits soon as it starts.

$ docker ps -a
CONTAINER ID  IMAGE                     COMMAND                 CREATED         STATUS PORTS                NAMES
be670158d200  cmsopendata/cmssw_5_3_32  "/opt/cms/entrypoint…"  34 minutes ago  Exited (139) 3 seconds ago  opendata

These are other things I have tried to no avail.

$ docker exec -it be670158d200 /bin/bash
Error response from daemon: Container be670158d200ae85871fbda810fa6074dcb7bc8fc606f000710f630add1b80b6 is not running
$ docker start --attach be670158d200
failed to resize tty, using default size

My question is similar to this: Docker - Container is not running, but I know that unlike in that question, here I should be getting the shell.

I am running this in Windows Subsystem for Linux 2 - Ubuntu 20.04, docker version 19.03.8 - build afacb8b7f0. Any help is greatly appreciated, thanks.


Solution

  • I had the same error with below logs

    dockerd[15309]: time="2022-01-11T11:13:35.133154132+05:30" level=error msg="Handler for POST /v1.41/exec/94553dc2f9aaa3c1245df7384138786a8a576af99105a285258fce8b980b4660/resize returned error: timeout waiting for exec session ready"

    This is a bug in docker 20.10 version and can be solved by downgrading containerd rpm

    Removed: containerd.io.x86_64 0:1.4.4-3.1.el7

    Installed: containerd.io.x86_64 0:1.4.3-3.1.el7