我提到了官方Docker文档:Create a base image并执行了以下命令:
sudo debootstrap raring raring > /dev/null
sudo tar -C raring -c . | sudo docker import - raring
sudo docker run raring cat /etc/lsb-release
我收到了最后一个命令和图片的错误消息" raring"是空的,0B。
container_linux.go:247: starting container process caused "exec: \"cat\": executable file not found in $PATH"
docker: Error response from daemon: oci runtime error:
container_linux.go:247: starting container process caused "exec: \"cat\": executable file not found in $PATH".
ERRO[0000] error getting events from daemon: net/http: request canceled
由于图片为空,我将目标从/ dev / null更改为./rootfs,引用此页面:How can I make my own base image for Docker?
sudo debootstrap raring ./rootfs
但是deboostrap未能获取Release:
I: Retrieving InRelease
I: Failed to retrieve InRelease
I: Retrieving Release
E: Failed getting release file http://archive.ubuntu.com/ubuntu/dists/raring/Release
使用wget和我的浏览器,我发现" http://archive.ubuntu.com/ubuntu/dists/raring/Release"是一个404页。
我的Linux发行版是:
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=14.04
DISTRIB_CODENAME=trusty
DISTRIB_DESCRIPTION="Ubuntu 14.04.5 LTS"
我的泊坞版是:
Client:
Version: 17.04.0-ce
API version: 1.28
Go version: go1.7.5
Git commit: 4845c56
Built: Mon Apr 3 18:01:08 2017
OS/Arch: linux/amd64
Server:
Version: 17.04.0-ce
API version: 1.28 (minimum version 1.12)
Go version: go1.7.5
Git commit: 4845c56
Built: Mon Apr 3 18:01:08 2017
OS/Arch: linux/amd64
Experimental: false
如何解决此问题或是否有一种新方法可以制作我自己的基本图像?任何建议将不胜感激。 :)
答案 0 :(得分:1)
文档已过期 - 它列出了一个旧的非lts版本的ubuntu(WHERE (TRUNC(INSTALLMENT_DATE) - TRUNC(TO_DATE('12/01/2011','DD/MM/YYYY')))
BETWEEN (-30) AND (-1)
,raring
) - 我已提交拉取请求以将其更新为更多 - 最近的LTS版本(13.04
,xenial
):https://github.com/docker/docker.github.io/pull/3859
以下命令效果很好:
16.04