Sep 23, 2015

Can not access docker container with "docker exec -it /bin/bash" - Just returns the host prompt on Fedora 22

I built a new docker container as a database server with the last mariadb source on docker.io/fedora:latest.

After building and installing the software, I started the database-server.

When I wanted to access the container with the
docker exec -it <container> /bin/bash

I just fell back to the host prompt.

A
journalctl -r 

and a warning-Alert showed some SE-Linux problems.

$ docker version
Client:
 Version:      1.8.1.fc22
 API version:  1.20
 Package Version: docker-1.8.1-3.git32b8b25.fc22.x86_64
 Go version:   go1.4.2
 Git commit:   32b8b25/1.8.1
 Built:      
 OS/Arch:      linux/amd64
Server:
 Version:      1.8.1.fc22
 API version:  1.20
 Package Version:
 Go version:   go1.4.2
 Git commit:   32b8b25/1.8.1
 Built:      
 OS/Arch:      linux/amd64


After reading the Ticket 1232803, I did a

sudo dnf reinstall docker-selinux

and after the reinstallation, I could access the container again.