Docker Community Forums

Share and learn in the Docker community.

Docker Build Command Fails


(Jim Kelly) #1

Expected behavior

Docker build completes successfully

Actual behavior

Command fails with the following error:

✘ jkelly@nibbler  ~/dev/scratch  docker build .                                                                                                                                           1
Sending build context to Docker daemon 5.928 MB
Step 1 : FROM python:2.7.11
2.7.11: Pulling from library/python

efd26ecc9548: Already exists
a3ed95caeb02: Download complete
d1784d73276e: Already exists
72e581645fc3: Extracting [==================================================>] 42.49 MB/42.49 MB
9709ddcc4d24: Download complete
2d600f0ec235: Download complete
b94f8b1a23eb: Download complete
636ba443b420: Download complete
failed to register layer: rename /var/lib/docker/image/aufs/layerdb/tmp/layer-206007246 /var/lib/docker/image/aufs/layerdb/sha256/255386472d2ee4536fd170fd76afcc82628ae848b90a90b5f40692f65afd712e: directory not empty

This works correctly on a docker-machine run docker-daemon.

Information

  • the output of:

    • pinata diagnose -u on OSX

    OS X: version 10.11.4 (build: 15E65)
    Docker.app: version v1.11.0-beta8.2
    Running diagnostic tests:
    [OK] docker-cli
    [OK] Moby booted
    [OK] driver.amd64-linux
    [OK] vmnetd
    [OK] osxfs
    [OK] db
    [OK] slirp
    [OK] menubar
    [OK] environment
    [OK] Docker
    [OK] VT-x
    Docker logs are being collected into /tmp/20160425-223937.tar.gz
    Most specific failure is: No error was detected
    Your unique id is: 5218E5A7-551B-4911-8936-360FE4A612BA
    Please quote this in all correspondence.

  • a reproducible case if this is a bug, Dockerfiles FTW

Simple Dockerfile:

FROM python:2.7.11
CMD echo "ohai"

Steps to reproduce the behavior

  1. Put the above Dockerfile in your cwd
  2. docker build .

Note that it seems to me that this is potentially some sort of inconsistency in the Docker daemon itself, and maybe not 100% related to Docker for Mac, but given that it works in normal Docker and I’m not sure how I’d go about fixing it, I figured I’d drop this here.