Skip to content

Instantly share code, notes, and snippets.

@joshwget
Last active March 14, 2017 04:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save joshwget/3c747a6598483c40257e8b70c27911af to your computer and use it in GitHub Desktop.
Save joshwget/3c747a6598483c40257e8b70c27911af to your computer and use it in GitHub Desktop.
Enabling SELinux

These instructions apply to RHEL and CentOS hosts.

Install Docker from RHEL rather than from the official sources

yum install docker
systemctl enable docker

Set SELINUX to enforcing in /etc/selinux/config and reboot.

After rebooting start Docker.

systemctl start docker

Run the following to verify that SELinux is enabled in Docker and enforcing. You should get permission denied in the last step.

docker run -it -v /test:/test busybox sh
touch /test/test

Follow the instructions in https://gist.github.com/joshwget/413f45a31e42f1f23024558ba4c6a3f6 to enable the fix for Rancher IPsec networking.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment