frntn/docker-cloud9
Web-based Cloud9 IDE container
:whale: Web-based IDE inside a docker container
Web-based Cloud9 IDE container
Thanks for the blog. This inspired me to learn docker. So... I am docker noob
I started with these steps and wanted to build this myself since.. you know I am new and want to learn docker.
I am having trouble when I docker build
when the docker daemon
is running with a valid user
% cat /etc/subuid
dragon:1000:1000
dockremap:165536:65536
% cat /etc/subgid
dragon:1000:1000
dockremap:165536:65536
and when I have the daemon as
sudo /usr/bin/docker daemon --userns-remap=dragon
and execute
% ls -latr 16-03-08 - 10:51:09
total 24
drwxrwxrwx 4 dragon dragon 4096 Mar 7 09:31 ..
-rwxrwxrwx 1 dragon dragon 204 Mar 7 19:57 supervisord.conf
-rwxrwxrwx 1 dragon dragon 691 Mar 8 05:44 Dockerfile-mod
-rwxrwxrwx 1 dragon dragon 1053 Mar 8 05:48 Dockerfile
-rwxrwxrwx 1 dragon dragon 2709 Mar 8 10:23 .alias
drwxrwxrwx 2 dragon dragon 4096 Mar 8 10:51 .
% docker build -t rrag/cloud9 .
after a few mins of lots of things getting printed I see
:Compiling ncurses...
tar: ncurses-5.9/test/inchs.c: Cannot change ownership to uid 1001, gid 0: Invalid argument
tar: ncurses-5.9/test/ncurses_tst.hin: Cannot change ownership to uid 1001, gid 0: Invalid argument
tar: ncurses-5.9/test/keynames.c: Cannot change ownership to uid 1001, gid 0: Invalid argument
....
and the build aborts.
Now when I stop and restart the daemon with
sudo /usr/bin/docker daemon --userns-remap=default
The whole build is successful. and I am able to launch c9, and the .c9
is created with 165536
as expected.
It got me thinking, may be the build wont work, so let me pull down your image
again
sudo /usr/bin/docker daemon --userns-remap=dragon
and
% docker pull frntn/cloud9 16-03-08 - 10:57:43
Using default tag: latest
latest: Pulling from frntn/cloud9
7268d8f794c4: Pull complete
a3ed95caeb02: Pull complete
d9a49bc2b1b0: Pull complete
b965864d2d45: Pull complete
47bed597ecf4: Pull complete
432750a489d5: Pull complete
ad86930c50cb: Pull complete
c7743c99b67e: Pull complete
caabee7d9368: Extracting [==================================================>] 102.1 MB/102.1 MB
22ec05f47241: Download complete
771be47a7e83: Download complete
8a6ffb3d8644: Download complete
4d0c718f85a2: Download complete
6e618d1b0094: Download complete
8ca9988a6281: Download complete
037a649b005a: Download complete
b35450747bf8: Download complete
f7d5cf41f0cc: Download complete
failed to register layer: Untar re-exec error: exit status 1: output: Container ID 1001 cannot be mapped to a host ID
well, may be there was a problem with the way you pushed it up. let me push my own and pull that and see what happens.
again same result.
I was out of ideas, reading all the documentation leads me to believe your approach is correct. but still no luck.
% pwd
/var/lib/docker
% ls -latr
total 20
drwxr-xr-x 64 root root 4096 Mar 6 13:01 ..
drwx------ 9 dragon dragon 4096 Mar 7 10:24 1000.1000
drw------- 3 root root 4096 Mar 8 10:30 network
drwx-----x 5 root root 4096 Mar 8 10:35 .
drwx------ 9 165536 165536 4096 Mar 8 10:35 165536.165536
now
% sudo su
% rm -rf 1000.1000
% mv 165536.165536 1000.1000
% chown dragon:dragon 1000.1000
% cd 1000.1000
change the ownership to dragon:dragon
for those which were owned by 165536.165536
Now restart docker daemon with
sudo /usr/bin/docker daemon --userns-remap=dragon
docker images
I see everything !!!, and it works when I start c9 and the .c9
folder is created with dragon:dragon
I realize what I have done is basically rename 165536 as 1000 and updated the right permissions, and this is certainly a hack.
I would love to hear from you if there is a better solution or may be you missed to add a step in your blog. I keep coming across newuidmap
when ever I search for /etc/subuid
so is it likely you missed to update a step in your blog?
Thanks again for this article, it is well written and got me interested to learn docker.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.