Ubuntu based docker-machine image

流过昼夜 提交于 2019-12-04 11:02:06

问题


Is there a possibility to simply create a docker-machine that is non-boot2docker based (i.e., Ubuntu based) (which uses virtualbox driver)?

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.

I know I can create it manually. I'm just wondering if there is a simple way such as docker-machine create is.


回答1:


You could take advantage of the --virtualbox-boot2docker-url option.
This issue illustrates its usage (with an iso which is not a TinyCore one, but a RancherOS one)

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.

The key is to remove the parts not needed in order to be able to launch headless VM without using too much memory.

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


来源:https://stackoverflow.com/questions/33790273/ubuntu-based-docker-machine-image

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!