Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Docker 1.0 CentOS 6.5 “unable to mount sys as readonly” when running image

$ sudo docker run -i -t centos /bin/bash

Get the following error message:

2014/06/19 20:40:34 unable to remount sys readonly: unable to mount sys as readonly max retries reached

Added the the following parameter to /etc/sysconfig/docker and restarted the service (sudo service docker restart)

other_args="--exec-driver=lxc"

My /etc/sysconfig/docker looks like this (the --selinux-enabled was already in there before)

other_args="--exec-driver=lxc" other_args="--selinux-enabled"

like image 571
jlmontes Avatar asked Jun 19 '14 19:06

jlmontes


2 Answers

your /etc/sysconfig/docker needs to look like this:

other_args="--exec-driver=lxc --selinux-enabled"

otherwise it will not work.

like image 120
user3759460 Avatar answered Oct 02 '22 01:10

user3759460


I also see this when I upgraded to 1.0 from 0.11 on RHEL 6.5

--selinux was already set in /etc/sysconfig/docker and I had to set --exec-driver=lxc for conatainers to started working again.

like image 26
user3767301 Avatar answered Oct 01 '22 23:10

user3767301