您可以将Docker映像转换/构建为完整的OS映像吗? [英] Can you convert/build a docker image into a full OS image?
问题描述
我已经制作了一个Docker容器,其中包含一些用于部署的代码.但是,我意识到我正在处理的项目的结构更适合部署完整的ISO映像,而不是在运行库存debian的云VM之上运行docker,从而导致不必要的虚拟化层.
I have made a docker container meant with some code for deployment. However, I realised that the structure of the project I'm working with, it's more suitable to deploy a full ISO image, instead of running docker on top of a cloud VM running stock debian, leading to unnecessary layers of virtualization.
我知道docker打算部署在kubernetes上,但是在深入探讨这条路线之前,是否有一种简单的方法可以将deb9 docker映像转换为完整的deb9 OS映像?像docker import
的反义词一样?
I know that dockers are meant to be deployed on kubernetes, but before diving into that route, is there a simple way to convert a deb9 docker image into a full deb9 OS image? Like an opposite of docker import
?
推荐答案
您可以将docker 容器转换为完整的OS映像. Dockerfile debian示例将是
You can convert your docker container to an full os image. An Dockerfile debian example would be
FROM debian:stretch
RUN apt-get -y install --no-install-recommends \
linux-image-amd64 \
systemd-sysv
原则上,您必须安装一个内核和一个初始化系统.
In principal you have to install a kernel and an init system.
可以找到完整说明 github
这篇关于您可以将Docker映像转换/构建为完整的OS映像吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!