CloudCredo / cloudrocker

Apache License 2.0
34 stars 6 forks source link

`rock this` fails when run as root #12

Open mamacdon opened 9 years ago

mamacdon commented 9 years ago

UID 0 already exists in the raw image.

mamacdon@ubuntud:~$ sudo ./rocker/bin/rock this
Bootstrapping Docker setup - this will take a few minutes...
Downloading from https://s3.amazonaws.com/blob.cfblob.com/1030f8d6-15c8-48d6-a99f-db8742b136f4
acb06367c15f26cae90ef22f62f0e2a20bcf8e828174f730fe6b8e1fd119095b
Creating image configuration...
Creating image...
Sending build context to Docker daemon  2.56 kB
Sending build context to Docker daemon 
Step 0 : FROM cloudrocker-raw:latest
 ---> acb06367c15f
Step 1 : RUN /usr/sbin/useradd -mU -u 0 -d /app -s /bin/bash vcap
 ---> Running in 6782b2a5741b
useradd: UID 0 is not unique
2015/05/15 11:45:41 Error: Status: The command [/bin/sh -c /usr/sbin/useradd -mU -u 0 -d /app -s /bin/bash vcap] returned a non-zero code: 4, Code: 1
hatofmonkeys commented 9 years ago

Hi Mark,

Thanks for the issue. Do you recommend we mandate users run Rocker from non-root, or do we write a different (working) dockerfile when users are running as root? As you can imagine, user management is one of the "fun" pieces of this puzzle.

Colin

LaynePeng commented 9 years ago

Hi, I met the same issue, but without running 'rock this' as root. I have some issue to download ROCKER_FS from s3, so I download to local disk firstly. It is defintly the same with hosted in s3.

elc@atsg223:~/cmst$ rock this
Bootstrapping Docker setup - this will take a few minutes...
Downloading from http://127.0.0.1:8080/ROCKER_ROOTFS
6e0533d6ee5fd43272c0f3017d8ea5c34742d5e7cb95c103e60a5bc75f262eb8
Creating image configuration...
Creating image...
Sending build context to Docker daemon  2.56 kB
Sending build context to Docker daemon 
Step 0 : FROM cloudrocker-raw:latest
 ---> 6e0533d6ee5f
Step 1 : RUN /usr/sbin/useradd -mU -u 0 -d /app -s /bin/bash vcap
 ---> Running in 18ca17c76542
useradd: UID 0 is not unique
2015/07/07 00:22:28 Error: Status: The command '/bin/sh -c /usr/sbin/useradd -mU -u 0 -d /app -s /bin/bash vcap' returned a non-zero code: 4, Code: 4