Skip to content

Performing an image build with RUN adduser -u 1000000000 will result in no space left on host #28920

@gbraad

Description

@gbraad

Description

Doing an adduser -u 1000000000 in a RUN will cause the filesystem on the host to fill up and report a No space on device left.

Steps to reproduce the issue:

  1. Create a Dockerfile with RUN adduser user -u 1000000000 -g 0 -r -m -d /home/user/ -c "Default Application User"
  2. Perform docker build -t test .
  3. Wait until no space left on device is shown

Describe the results you received:

Step 3 : RUN adduser user -u 1000000000 -g 0 -r -m -d /home/user/ -c "Default Application User"
 ---> Running in e8472dbea9bf
ApplyLayer exit status 1 stdout:  stderr: write /var/log/lastlog: no space left on device
ERROR: Build failed: exit code 1

Describe the results you expected:
Succeeding build

Additional information you deem important (e.g. issue happens only occasionally):
Reproduced on GItlab CI runner as https://gitlab.com/gbraad/issue-docker/builds/6767776 (Source Dockerfile can be found in the repo: https://gitlab.com/gbraad/issue-docker)

Output of docker version:

Client:
 Version:         1.10.3
 API version:     1.22
 Package version: docker-common-1.10.3-46.el7.centos.10.x86_64
 Go version:      go1.6.3
 Git commit:      d381c64-unsupported
 Built:           Thu Aug  4 13:21:17 2016
 OS/Arch:         linux/amd64

Server:
 Version:         1.10.3
 API version:     1.22
 Package version: docker-common-1.10.3-46.el7.centos.10.x86_64
 Go version:      go1.6.3
 Git commit:      d381c64-unsupported
 Built:           Thu Aug  4 13:21:17 2016
 OS/Arch:         linux/amd64

Output of docker info:

Containers: 38
 Running: 0
 Paused: 0
 Stopped: 38
Images: 71
Server Version: 1.10.3
Storage Driver: overlay
 Backing Filesystem: extfs
Execution Driver: native-0.2
Logging Driver: journald
Plugins: 
 Volume: local
 Network: null host bridge
Kernel Version: 3.10.0-327.22.2.el7.x86_64
Operating System: CentOS Linux 7 (Core)
OSType: linux
Architecture: x86_64
Number of Docker Hooks: 2
CPUs: 1
Total Memory: 489.1 MiB
Name: vps13.novalocal
ID: ATDQ:VMVE:SNUV:P67X:KPBK:DHHF:JFII:O23Q:VPVU:HV6I:6BZO:FE36
Username: gbraad
Registry: https://index.docker.io/v1/
WARNING: bridge-nf-call-iptables is disabled
WARNING: bridge-nf-call-ip6tables is disabled
Registries: docker.io (secure)

Additional environment details (AWS, VirtualBox, physical, etc.):

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions