如何为Docker制作自己的基本图像? [英] How can I make my own base image for Docker?

查看:142
本文介绍了如何为Docker制作自己的基本图像?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

根据 Docker文档,为了构建您自己的图像,您必须始终指定基数图像使用 FROM 指令。

According to the Docker documentation, to build your own image, you must always specify a base image using the FROM instruction.

显然,在 Docker索引,但如果我想建立自己的索引呢?这是可能的吗?

Obviously, there are lots of images to choose from in the Docker index, but what if I wanted to build my own? Is that possible?

如果我理解正确,图像 base 是由Ubuntu构建的,我想试验一个Debian镜像。另外,我想真正了解Docker的工作原理,而 base image对我而言仍然是一个黑盒子。

The image base is built off Ubuntu if I understand correctly, and I want to experiment with a Debian image. Plus, I want to really understand how Docker works, and the base image is still a blackbox for me.

推荐答案

你可以看看基础图像是如何创建的,从那里去。

You can take a look at how the base images are created and go from there.

你可以在这里找到它们: https://github.com/dotcloud/docker/tree/master/contrib
有mkimage-busybox.sh,mkimage-unittest.sh,mkimage-debian.sh

You can find them here: https://github.com/dotcloud/docker/tree/master/contrib. There is mkimage-busybox.sh, mkimage-unittest.sh, mkimage-debian.sh

这篇关于如何为Docker制作自己的基本图像?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆