Docker Community Forums

Share and learn in the Docker community.

API POST /build tar file too large

(Earlpower) #1

Centos 7
Running remotely using API trying to build
curl -s -X GET “http://dockerbuild1:2375/version” | jq .
“KernelVersion”: “3.10.0-327.el7.x86_64”,
“Arch”: “amd64”,
“Os”: “linux”,
“GoVersion”: “go1.6.3”,
“GitCommit”: “23cf638”,
“ApiVersion”: “1.24”,
“Version”: “1.12.1”

curl -s -X POST “http://dockerbuild1:2375/build” -H Content-type: application/tar -d@runabl.tar
{“message”:“archive/tar: invalid tar header”}

The tar file is 465M and through some trial and error I see that a tar file of a ~3M is fine but there must be some upper limit on the server side.

Saw a post suggesting a change to dockerd args and now i’m running with the following storage options:
ps -deaflww | grep [d]ockerd
4 S root 9154 1 0 80 0 - 139423 futex_ Sep08 ? 00:00:16 /usr/bin/dockerd -H unix:///var/run/docker.sock -H tcp:// --storage-opt dm.basesize=20G --storage-opt dm.loopdatasize=256G

Has anyone seen this error?

I’ve read a lot of the docs and I can’t see configuration showing server file size limit of dockerd or even figure out where exactly the tar ball get extracted prior to running the Dockerfile on the build machine. Any kind of debugging output would be nice but i can’t find anything but the usual messages. /var/log/messages only shows the same error message:

Sep 9 19:21:15 uxlxdevops04 dockerd: time=“2016-09-09T19:21:15.612481477-04:00” level=error msg=“Handler for POST /build returned error: archive/tar: invalid tar header”

Suggestions anyone?: