ccortezia
ccortezia

Reputation: 93

Docker failing to load apparmor profile upon ubuntu host boot

I have a container x that fails to start automatically upon host boot.

The last message in the container's log is:

set apparmor profile docker-default: no such file or directory

The same container x runs fine if I manually run "docker start x"

Any ideas on what's wrong with my environment ?

Upvotes: 9

Views: 12806

Answers (3)

dmcontador
dmcontador

Reputation: 668

Apparently, installing apparmor is not enough, since the problem happens even with apparmor installed. More exactly, the error happens because of the docker daemon being loaded before apparmor set its config as explained here.

Full solution:

sudo apt-get install apparmor

and:

sudo service apparmor restart # Just in case
sudo service docker restart

Should work after that. At least, for me it did.

Upvotes: 3

semente
semente

Reputation: 7523

In case you are using fig... I was having the same issue because a wrong "volumes" entry in my fig.yml:

db:
  image: postgres:9
  volumes: ./docker-entrypoint-initdb.d:/docker-entrypoint-initdb.d

After changing it to the following code, docker could start the "db" container:

db:
  image: postgres:9
  volumes:
    - ./docker-entrypoint-initdb.d:/docker-entrypoint-initdb.d

Upvotes: 5

saden1
saden1

Reputation: 89

I just updated to the latest version of docker (first to 0.11.0 and now to 0.11.0) and I am experiencing the same thing on Linux Mint 15 Olivia. Installing apparmor seems to have fixed the issue:

sudo apt-get install apparmor

Upvotes: 8

Related Questions