Docker can safely and easily run in conjunction with selinux. To ensure you're setup for selinux support, check the following:
'getenforce' - Are you enforcing/permissive/disabled? You should be enforcing. if not, run 'setenforce 1'.
'yum list installed docker-selinux*' - If nothing returns, then you're missing the selinux components and need to install them. Run 'yum install -y docker-selinux' to resolve.
'cat /etc/sysconfig/docker | grep OPTIONS' - You should see 'OPTIONS='--selinux-enabled''. If not make the change and restart the docker daemon: 'systemctl restart docker'.
Docker works auto-magically with selinux to enhance your system's security. The only things you need to do to properly work with the tool are to understand the switches involved with bind mounting storage. Visit the Bind Mounting Storage & Ports and Working with NFS mounts articles if you haven't already to understand the caveats with selinux and docker storage.
Next: Conclusion
Showing posts with label yum. Show all posts
Showing posts with label yum. Show all posts
Monday, November 2, 2015
Thursday, October 29, 2015
Real-world Docker Series: Installing Docker
Since this is intended to be a real-world Docker series, we're focusing on Red Hat Enterprise Linux 7. CentOS7 will be very similar, but make sure you understand the differences between the OSes.
The first thing to do is to make sure you have the extras repository enabled.
yum repolist enabled|grep server-extras
!rhel-7-server-extras-rpms/x86_64 Red Hat Enterprise L 112
If you don't see it listed, run:
subscription-manager repos --enable=rhel-7-server-extras-rpms
Run the first command again, to ensure the repository is now enabled.
Installing Docker:
sudo yum install docker -y
This will install docker and its dependencies, which should include the following:
docker.x86_64 1.7.1-115.el7 @rhel-7-server-extras-rpms
docker-selinux.x86_64 1.7.1-115.el7 @rhel-7-server-extras-rpms
docker-logrotate.x86_64 1.7.1-115.el7 rhel-7-server-extras-rpms
docker-python.x86_64 1.4.0-115.el7 rhel-7-server-extras-rpms
docker-registry.noarch 0.6.8-8.el7 rhel-7-server-extras-rpms
docker-registry.x86_64 0.9.1-7.el7 rhel-7-server-extras-rpms
Next: Configuring Docker Storage
The first thing to do is to make sure you have the extras repository enabled.
yum repolist enabled|grep server-extras
!rhel-7-server-extras-rpms/x86_64 Red Hat Enterprise L 112
If you don't see it listed, run:
subscription-manager repos --enable=rhel-7-server-extras-rpms
Run the first command again, to ensure the repository is now enabled.
Installing Docker:
sudo yum install docker -y
This will install docker and its dependencies, which should include the following:
docker.x86_64 1.7.1-115.el7 @rhel-7-server-extras-rpms
docker-selinux.x86_64 1.7.1-115.el7 @rhel-7-server-extras-rpms
docker-logrotate.x86_64 1.7.1-115.el7 rhel-7-server-extras-rpms
docker-python.x86_64 1.4.0-115.el7 rhel-7-server-extras-rpms
docker-registry.noarch 0.6.8-8.el7 rhel-7-server-extras-rpms
docker-registry.x86_64 0.9.1-7.el7 rhel-7-server-extras-rpms
Next: Configuring Docker Storage
Subscribe to:
Posts (Atom)
