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

addgroup fails #135

Closed
elderone opened this issue Aug 1, 2014 · 10 comments
Closed

addgroup fails #135

elderone opened this issue Aug 1, 2014 · 10 comments

Comments

@elderone
Copy link

@elderone elderone commented Aug 1, 2014

docker run -i -t stackbrew/ubuntu:12.04 /bin/bash
apt-get install -y ssh-client
...
Setting up openssh-client (1:5.9p1-5ubuntu1.4) ...
groupadd: failure while writing changes to /etc/group
addgroup: `/usr/sbin/groupadd -g 102 ssh' returned error code 10. Exiting.
dpkg: error processing openssh-client (--configure):
subprocess installed post-installation script returned error exit status 1
Setting up xauth (1:1.0.6-1) ...
Processing triggers for libc-bin ...
ldconfig deferred processing now taking place
Errors were encountered while processing:
openssh-client
E: Sub-process /usr/bin/dpkg returned an error code (1)

@elderone elderone changed the title addgroup addgroup fails Aug 1, 2014
@yosifkit

This comment has been minimized.

Copy link
Member

@yosifkit yosifkit commented Aug 5, 2014

I do not get any errors running this. What is your docker version, docker -D info and uname -a?

@elderone

This comment has been minimized.

Copy link
Author

@elderone elderone commented Aug 6, 2014

# docker version
Client version: 1.0.0
Client API version: 1.12
Go version (client): go1.2.2
Git commit (client): 63fe64c/1.0.0
Server version: 1.0.0
Server API version: 1.12
Go version (server): go1.2.2
Git commit (server): 63fe64c/1.0.0

# docker -D info
Containers: 15
Images: 362
Storage Driver: devicemapper
 Pool Name: docker-253:1-202217530-pool
 Data file: /var/lib/docker/devicemapper/devicemapper/data
 Metadata file: /var/lib/docker/devicemapper/devicemapper/metadata
 Data Space Used: 17197.2 Mb
 Data Space Total: 102400.0 Mb
 Metadata Space Used: 21.3 Mb
 Metadata Space Total: 2048.0 Mb
Execution Driver: native-0.2
Kernel Version: 3.10.0-123.4.4.el7.x86_64
Debug mode (server): false
Debug mode (client): true
Fds: 62
Goroutines: 82
EventsListeners: 0
Init SHA1: 4d35b599430acebe2c845a4f209febec451d9604
Init Path: /usr/libexec/docker/dockerinit

# uname -a
Linux server.srv 3.10.0-123.4.4.el7.x86_64 #1 SMP Fri Jul 25 05:07:12 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux

# cat /etc/centos-release
CentOS Linux release 7.0.1406 (Core)

docker-io.x86_64                 1.0.0-1.el7                        @epel
@cpuguy83

This comment has been minimized.

Copy link
Contributor

@cpuguy83 cpuguy83 commented Aug 6, 2014

@elderone Please update to 1.1.2, I'm pretty sure this is fixed.

@Artimi

This comment has been minimized.

Copy link

@Artimi Artimi commented Sep 11, 2014

I have this problem too.

When I try to build image based on this Dockerfile:

FROM ubuntu:12.04

RUN apt-get update
# for install add-apt-repository command
RUN apt-get -y install python-software-properties
RUN add-apt-repository -y ppa:biometrics/bob
RUN apt-get update
RUN apt-get -y install bob

In last step I get this:

groupadd: failure while writing changes to /etc/group
addgroup: `/usr/sbin/groupadd -g 102 utempter' returned error code 10. Exiting.
dpkg: error processing libutempter0 (--configure):
 subprocess installed post-installation script returned error exit status 1

My environment:

# docker version
Client version: 1.2.0
Client API version: 1.14
Go version (client): go1.2.2
Git commit (client): fa7b24f/1.2.0
OS/Arch (client): linux/amd64
Server version: 1.2.0
Server API version: 1.14
Go version (server): go1.2.2
Git commit (server): fa7b24f/1.2.0

#  docker -D info
Containers: 19
Images: 47
Storage Driver: devicemapper
 Pool Name: docker-253:1-135861-pool
 Pool Blocksize: 64 Kb
 Data file: /var/lib/docker/devicemapper/devicemapper/data
 Metadata file: /var/lib/docker/devicemapper/devicemapper/metadata
 Data Space Used: 3090.8 Mb
 Data Space Total: 102400.0 Mb
 Metadata Space Used: 4.8 Mb
 Metadata Space Total: 2048.0 Mb
Execution Driver: native-0.2
Kernel Version: 3.15.10-201.fc20.x86_64
Operating System: Fedora 20 (Heisenbug)
Debug mode (server): false
Debug mode (client): true
Fds: 12
Goroutines: 14
EventsListeners: 0
Init SHA1: 4f84c8386a0072bb60fd1258f41f43e377e0b6c9
Init Path: /usr/libexec/docker/dockerinit

# uname -a 
Linux localhost.localdomain 3.15.10-201.fc20.x86_64 #1 SMP Wed Aug 27 21:10:06 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
@yosifkit

This comment has been minimized.

Copy link
Member

@yosifkit yosifkit commented Sep 12, 2014

@cpuguy83 any thoughts on why it would be still broken on Docker 1.2.0? Perhaps an issue with devicemapper?

@joseblas

This comment has been minimized.

Copy link

@joseblas joseblas commented Sep 24, 2014

@cpuguy83
I have the same problem from 1.14.

groupadd: failure while writing changes to /etc/group
addgroup: `/usr/sbin/groupadd -g 102 ssh' returned error code 10. Exiting.
dpkg: error processing openssh-client (--configure):
subprocess installed post-installation script returned error exit status 1

#docker version
Client version: 1.2.0
Client API version: 1.14
Go version (client): go1.2.2
Git commit (client): fa7b24f/1.2.0
OS/Arch (client): linux/amd64
Server version: 1.2.0
Server API version: 1.14
Go version (server): go1.2.2
Git commit (server): fa7b24f/1.2.0

@neingeist

This comment has been minimized.

Copy link

@neingeist neingeist commented Oct 10, 2014

FYI, It's broken with a Ubuntu 12.04 image, but not with an Ubuntu 14.04 image. Running the FC20 shipped docker-io-1.2.0-2.fc20.x86_64 here.

@e0d

This comment has been minimized.

Copy link

@e0d e0d commented Nov 16, 2014

The root cause seems to be an inability to write to /etc/passwd or /etc/group on 12.04

This minimal Docker file fail when run from FC20

FROM ubuntu:12.04.5
MAINTAINER e0d
RUN groupadd foo
EXPOSE 22 3000
ENTRYPOINT ["/bin/bash"]
@e0d

This comment has been minimized.

Copy link

@e0d e0d commented Nov 16, 2014

The issue on FC20 is SELinux related, the ham-fisted work around is:

sudo setenforce 0

I'll work out exactly what's going on when I have a free moment.

@yosifkit

This comment has been minimized.

Copy link
Member

@yosifkit yosifkit commented Jan 22, 2015

I am unable to reproduce this and it seems to be related to SELinux. Closing for now.

@yosifkit yosifkit closed this Jan 22, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
7 participants
You can’t perform that action at this time.