I'm unable to run an interactive session with Centos:6 in docker. Works perfectly with Centos:7
>docker -v
Docker version 18.03.0-ce, build 0520e24302
>docker pull centos:6
...
>docker run -it centos:6
[just returns to my terminal]
>docker pull centos:7
...
>docker run -it centos:7
>[root@f8c0430ed2ba /]#cat /etc/redhat-release
CentOS Linux release 7.4.1708 (Core)
Any idea what is going on ?
I tried with older version of docker and i pulled all new images Centos:6/6.6/6.7/6.8/6.9 and it shows the same problems. I also tried with /bin/bash or sh at the end.
Also i'm sure that it used to work more or less one year ago. I'm using ArchLinux
If you need to start an interactive shell inside a Docker Container, perhaps to explore the filesystem or debug running processes, use docker exec with the -i and -t flags. The -i flag keeps input open to the container, and the -t flag creates a pseudo-terminal that the shell can attach to.
Docker Container Interactive Mode for Redis Container We can first start a Redis Docker container in background using the below command. This will basically pull the Redis Docker image from Docker Hub and start up a container running the same. Next, we can get the id of the running container using the below command.
OS requirementsTo install Docker Engine, you need a maintained version of CentOS 7, CentOS 8 (stream), or CentOS 9 (stream). Archived versions aren't supported or tested. The centos-extras repository must be enabled. This repository is enabled by default, but if you have disabled it, you need to re-enable it.
Running a GUI program in Docker can be a useful technique when you're evaluating a new piece of software. You can install the software in a clean container, instead of having to pollute your host with new packages. This approach also helps you avoid any incompatibilities with other packages in your environment.
It is a known issue that seems to be linked to the Spectre patch:
issue 103 says:
Running a docker run --rm -it centos:6 bash fails with exit status 139 (i.e. bash exits with SIGSEGV) on Linux kernel 4.15.9. Downgrading to 4.14.15 (which is vulnerable to Spectre V1) gets rid of the segfault.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With