Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Image does not work on ubuntu 14.04 (docker 0.9.1) #4

Closed
kevwilde opened this issue Jun 5, 2014 · 2 comments
Closed

Image does not work on ubuntu 14.04 (docker 0.9.1) #4

kevwilde opened this issue Jun 5, 2014 · 2 comments

Comments

@kevwilde
Copy link

kevwilde commented Jun 5, 2014

Currently I have tested it on two different ubuntu 14.04 setups with the "docker.io" (verion 0.9.1) package installed.

Running the image from the docker index as indicated in the Readme immediately exits with no logs.

I forked the project and built the image myself and everything works fine. Side note: the official image works perfectly on a docker vps from digitalocean (13.10, docker 0.11.1).

@kevwilde
Copy link
Author

kevwilde commented Jun 5, 2014

Other differences between the two images:

There seems to be a disparity when su'ing to the postgres user:

$ docker run -i -t orchardup/postgresql /bin/bash
root@9abd1b3e9be9:/# sudo su - postgres
No directory, logging in with HOME=/
-su: /etc/profile: Permission denied
-su-4.2$ 

vs

docker run -i -t kevwilde/postgresql /bin/bash
root@385d11498119:/# sudo su - postgres
postgres@385d11498119:~$ 

I believe this is the cause of the problem.

Comparing the postgres user:

in orchardup/postgresql:

root@9abd1b3e9be9:/# finger postgres
Login: postgres                 Name: PostgreSQL administrator
Directory: /var/lib/postgresql          Shell: /bin/bash
Never logged in.
No mail.
No Plan.

in kevwilde/postgresql:

root@3c5c32d718ae:/# finger postgres
Login: postgres                 Name: PostgreSQL administrator
Directory: /var/lib/postgresql          Shell: /bin/bash
Never logged in.
No mail.
No Plan.

Other things I checked:

  • postgres users have the same finger output
  • permissions of /var/lib/postgres are identical
  • permissions of /etc/bash.bashrc are identical
  • groups of the postgres user are identical

Finally, the difference is in the permissions of the /etc directory itself:

kevwilde/postgresql:

drwxr-xr-x  86 root root    4096 Jun  5 09:39 etc

orchardup/postgresql:

d--x--x---  77 root root    4096 Jun  5 09:31 etc

I think it might be related to this issue: moby/moby#4068

@kevwilde
Copy link
Author

kevwilde commented Jun 5, 2014

It seems to be resolved by adding -s=devicemapper to the DOCKER_OPTS field (ref: https://stackoverflow.com/questions/20810555/ensure-that-docker-is-using-device-mapper-storage-backend)

@kevwilde kevwilde closed this as completed Jun 5, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant