oswitch
oswitch copied to clipboard
Issue if carrying over UID that already exists
Yannick@ybook ~/g/automarking> oswitch r-base master?
Sending build context to Docker daemon 5.632 kB
Sending build context to Docker daemon
Step 0 : FROM r-base
Pulling repository r-base
ae89439e8e1c: Download complete
4b4e4ca4575f: Download complete
457e0d87fbb7: Download complete
4c7d0b3bff9e: Download complete
ad0a182d3a03: Download complete
38c34be1110f: Download complete
ac6b0ef731ff: Download complete
3f038db33f1a: Download complete
7a6cfcb98ec8: Download complete
025b6b15e88f: Download complete
0f801118158c: Download complete
b72d6ff612f7: Download complete
Status: Downloaded newer image for r-base:latest
---> ae89439e8e1c
Step 1 : COPY _switch /
---> 2943829411e3
Removing intermediate container 393c55f06834
Step 2 : COPY wheel /etc/sudoers.d/
---> 2ee77fb9919a
Removing intermediate container 1964410d0163
Step 3 : RUN /_switch 1000 50 Yannick /Users/Yannick zsh 2>&1
---> Running in 47831ca5072e
Switch-ifying ...
Assuming Ubuntu.
Attempting to activate universe and multiverse repositories.
Reading package lists...
E: The value 'testing' is invalid for APT::Default-Release as such a release is not available in the sources
/_switch: 27: /_switch: apt-add-repository: not found
/_switch: 28: /_switch: apt-add-repository: not found
Oops ... it is Debian. Continuing.
Updating list of packages.
Get:1 http://security.debian.org testing/updates InRelease [62.8 kB]
Get:2 http://security.debian.org testing/updates/main amd64 Packages [20 B]
Get:3 http://httpredir.debian.org testing InRelease [193 kB]
Get:4 http://httpredir.debian.org testing-updates InRelease [113 kB]
Get:5 http://http.debian.net sid InRelease [256 kB]
Get:6 http://httpredir.debian.org testing/main amd64 Packages [9,773 kB]
Get:7 http://httpredir.debian.org testing-updates/main amd64 Packages [20 B]
Get:8 http://http.debian.net sid/main amd64 Packages [10.4 MB]
Fetched 20.8 MB in 28s (734 kB/s)
Reading package lists...
Installing utilities.
Reading package lists...
Building dependency tree...
Reading state information...
less is already the newest version.
The following NEW packages will be installed:
sudo
0 upgraded, 1 newly installed, 0 to remove and 9 not upgraded.
Need to get 920 kB of archives.
After this operation, 2,895 kB of additional disk space will be used.
Get:1 http://httpredir.debian.org/debian/ testing/main sudo amd64 1.8.12-1 [920 kB]
debconf: delaying package configuration, since apt-utils is not installed
Fetched 920 kB in 11s (82.2 kB/s)
Selecting previously unselected package sudo.
(Reading database ... 16905 files and directories currently installed.)
Preparing to unpack .../sudo_1.8.12-1_amd64.deb ...
Unpacking sudo (1.8.12-1) ...
Processing triggers for systemd (227-2) ...
Setting up sudo (1.8.12-1) ...
Processing triggers for systemd (227-2) ...
Setting up locale.
Reading package lists...
Building dependency tree...
Reading state information...
locales is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 9 not upgraded.
Generating locales (this might take a while)...
en_US.UTF-8... done
en_US.UTF-8... done
Generation complete.
Installing zsh as requested.
Reading package lists...
Building dependency tree...
Reading state information...
The following extra packages will be installed:
zsh-common
Suggested packages:
zsh-doc
The following NEW packages will be installed:
zsh zsh-common
0 upgraded, 2 newly installed, 0 to remove and 9 not upgraded.
Need to get 4,036 kB of archives.
After this operation, 14.3 MB of additional disk space will be used.
Get:1 http://httpredir.debian.org/debian/ testing/main zsh-common all 5.1.1-1 [3,282 kB]
Get:2 http://httpredir.debian.org/debian/ testing/main zsh amd64 5.1.1-1 [754 kB]
debconf: delaying package configuration, since apt-utils is not installed
Fetched 4,036 kB in 13s (296 kB/s)
Selecting previously unselected package zsh-common.
(Reading database ... 17008 files and directories currently installed.)
Preparing to unpack .../zsh-common_5.1.1-1_all.deb ...
Unpacking zsh-common (5.1.1-1) ...
Selecting previously unselected package zsh.
Preparing to unpack .../archives/zsh_5.1.1-1_amd64.deb ...
Unpacking zsh (5.1.1-1) ...
Setting up zsh-common (5.1.1-1) ...
Setting up zsh (5.1.1-1) ...
update-alternatives: using /bin/zsh5 to provide /bin/zsh (zsh) in auto mode
update-alternatives: using /bin/zsh5 to provide /bin/rzsh (rzsh) in auto mode
Creating user Yannick with uid 1000 ...
useradd: UID 1000 is not unique
Done.
Your home directory is .
You can use sudo.
---> c36d47a0060a
Removing intermediate container 47831ca5072e
Step 4 : ENV LC_ALL en_US.UTF-8
---> Running in 26eee679e529
---> d5ca368cd7b8
Removing intermediate container 26eee679e529
Step 5 : USER Yannick
---> Running in 38093bf4a567
---> 66430f9d2b9b
Removing intermediate container 38093bf4a567
Step 6 : ENTRYPOINT zsh -c
---> Running in 4d88a42d473b
---> a7b0ae5bd100
Removing intermediate container 4d88a42d473b
Successfully built a7b0ae5bd100
finalize namespace setup user get supplementary groups Unable to find user YannickFATA[0000] Error response from daemon: Cannot start container 58b749b8bc618492d7776315248a93734d0f2f140d82e8269849969a4223d7d3: finalize namespace setup user get supplementary groups Unable to find user Yannick
Yannick@ybook ~/g/automarking>
Yannick@ybook ~/g/automarking> oswitch r-base 1 master!
finalize namespace setup user get supplementary groups Unable to find user YannickFATA[0000] Error response from daemon: Cannot start container 6728d9e87873719b59bf8be6051c51c28738d6137addc380a3d042b6e89437c6: finalize namespace setup user get supplementary groups Unable to find user Yannick
Yannick@ybook ~/g/automarking>
oswitch could detect the failure that and try with a new UID, but I don't know how will filesystem permissions work with a different UID.
And why is UID 1000 already taken up within container? Perhaps the image is already providing a default user? In which case, do we say it's not compatible with oswitch or try to work that out.
This is r-base one of the most likely images to be used by biologists. so we need to support it...
On 17 Nov 2015, at 08:12, Anurag Priyam [email protected] wrote:
oswitch could detect the failure that and try with a new UID, but I don't know how will filesystem permissions work with a different UID.
And why is UID 1000 already taken up within container? Perhaps the image is already providing a default user? In which case, do we say it's not compatible with oswitch or try to work that out.
— Reply to this email directly or view it on GitHub.