CenturyLinkLabs / dockerfile-from-image

574 stars 134 forks source link

Bad Request: malformed Host header (Docker::Error::ClientError) #18

Open mariosotil opened 7 years ago

mariosotil commented 7 years ago

I'm getting this error. I tried with other images, and finally with the dockerfile-from-image itself

$ alias dfimage="docker run --rm -v /var/run/docker.sock:/var/run/docker.sock centurylink/dockerfile-from-image"
$ dfimage -f centurylink/dockerfile-from-image
/usr/lib/ruby/gems/2.2.0/gems/docker-api-1.24.1/lib/docker/connection.rb:42:in `rescue in request': 400 Bad Request: malformed Host header (Docker::Error::ClientError)
from /usr/lib/ruby/gems/2.2.0/gems/docker-api-1.24.1/lib/docker/connection.rb:38:in `request'
from /usr/lib/ruby/gems/2.2.0/gems/docker-api-1.24.1/lib/docker/connection.rb:65:in `block (2 levels) in <class:Connection>'
from /usr/lib/ruby/gems/2.2.0/gems/docker-api-1.24.1/lib/docker/image.rb:172:in `all'
from /usr/src/app/dockerfile-from-image.rb:32:in `<main>'

The computer is a Ubuntu Server 16.04 with Docker 1.12.5. May you help me, please?

Synesso commented 7 years ago

Also witnessed on OSX.

synthbeat commented 7 years ago

MacOS Sierra 10.12.2 with Docker 1.13.0, the same bug happens.

jheiss commented 7 years ago

This is a duplicate of #14, which has more info and workarounds

rakhi-alina commented 4 years ago

$ docker run --rm -v /var/run/docker.sock:/var/run/docker.sock centurylinklabs/dockerfile-from-image -f rakhi1905alina/persephone /usr/lib/ruby/gems/2.2.0/gems/docker-api-1.24.1/lib/docker/connection.rb:42:in rescue in request': 400 Bad Request: malformed Host header (Docker::Error::ClientError) from /usr/lib/ruby/gems/2.2.0/gems/docker-api-1.24.1/lib/docker/connection.rb:38:inrequest' from /usr/lib/ruby/gems/2.2.0/gems/docker-api-1.24.1/lib/docker/connection.rb:65:in block (2 levels) in <class:Connection>' from /usr/lib/ruby/gems/2.2.0/gems/docker-api-1.24.1/lib/docker/image.rb:172:inall' from /usr/src/app/dockerfile-from-image.rb:32:in <main>' $ docker run --rm -v /var/run/docker.sock:/var/run/docker.sock centurylinklabs/dockerfile-from-image -f 48139b6c86c3 /usr/lib/ruby/gems/2.2.0/gems/docker-api-1.24.1/lib/docker/connection.rb:42:inrescue in request': 400 Bad Request: malformed Host header (Docker::Error::ClientError) from /usr/lib/ruby/gems/2.2.0/gems/docker-api-1.24.1/lib/docker/connection.rb:38:in request' from /usr/lib/ruby/gems/2.2.0/gems/docker-api-1.24.1/lib/docker/connection.rb:65:inblock (2 levels) in ' from /usr/lib/ruby/gems/2.2.0/gems/docker-api-1.24.1/lib/docker/image.rb:172:in all' from /usr/src/app/dockerfile-from-image.rb:32:in

'