简体   繁体   English

基于Ubuntu的docker-machine映像

[英]Ubuntu based docker-machine image

Is there a possibility to simply create a docker-machine that is non-boot2docker based (ie, Ubuntu based) (which uses virtualbox driver)? 是否有可能简单地创建一个基于非boot2docker的docker-machine(即基于Ubuntu)(使用虚拟机驱动程序)?

I would like to have full-featured Linux distro running the docker daemon on my mac instead of Tiny Core Linux distro which is fast and lightweight but doesn't offer me all the debugging facilities I need. 我希望在我的mac上运行docker守护程序的全功能Linux发行版,而不是Tiny Core Linux发行版,它快速轻便但不提供我需要的所有调试工具。

I know I can create it manually. 我知道我可以手动创建它。 I'm just wondering if there is a simple way such as docker-machine create is. 我只是想知道是否有一种简单的方法,比如docker-machine create

You could take advantage of the --virtualbox-boot2docker-url option. 您可以利用--virtualbox-boot2docker-url选项。
This issue illustrates its usage (with an iso which is not a TinyCore one, but a RancherOS one ) 这个问题说明了它的用法(使用iso 不是 TinyCore,而是RancherOS

docker-machine create -d virtualbox --virtualbox-boot2docker-url https://releases.rancher.com/os/latest/machine-rancheros.iso rancher

If RancherOS is a bit too bare, you can take some clues from how boot2docker is currently built , and build your own distro. 如果RancherOS有点过于裸露,你可以从boot2docker目前的构建方式中获取一些线索,并构建自己的发行版。

The key is to remove the parts not needed in order to be able to launch headless VM without using too much memory. 关键是要删除不需要的部件,以便能够在不使用太多内存的情况下启动无头VM。

# Remove useless kernel modules, based on unclejack/debian2docker 
RUN cd $ROOTFS/lib/modules && \
rm -rf ./*/kernel/sound/* && \
rm -rf ./*/kernel/drivers/gpu/* && \
...

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM