【发布时间】:2020-05-01 00:04:33
【问题描述】:
我想从官方 Dockerhub 镜像生成Dockerfile,即influxDB
在尝试了建议的方法后
$ alias dfimage="docker run -v /var/run/docker.sock:/var/run/docker.sock --rm centurylink/dockerfile-from-image"
$ dfimage --help
$ docker pull influxdb
$ dfimage influxdb
我收到错误消息
/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>'
因此,如何从上述图像生成 Dockerfile。
【问题讨论】:
-
Do it doesn't since I try the solution and it return the above error message
-
您的错误消息让我认为您没有为此使用 hub.docker.com/r/chenzj/dfimage,如链接答案中所述
-
在这种情况下,您为什么不简单地获取dockerfile from the official repo ?
标签: docker dockerfile