The boot2docker.iso is built with Docker, via a Dockerfile.
During docker build
we
.iso
file on /
of the container.Running the resultant image will cat the iso file to STDOUT.
So the full build process goes like this:
# you will need more than 2GB memory
$ docker build -t boot2docker . && docker run --rm boot2docker > boot2docker.iso
Now you can install the iso to a USB drive, SD card, CD-Rom or hard-disk. The image contains a Master Boot Record, and a partition table, so can be written to a raw device.
$ sudo dd if=boot2docker.iso of=/dev/sdX
The boot2docker.iso
release process takes advantage of Docker Hub's
Automated Builds so
rather than modifying the Dockerfile
and re-building from scratch,
you can make a new Dockerfile
that builds FROM boot2docker/boot2docker
and then run that to generate your boot2docker.iso
file:
$ sudo docker pull boot2docker/boot2docker
$ echo "FROM boot2docker/boot2docker" > Dockerfile
$ echo "ADD . $ROOTFS/data/" >> Dockerfile
$ echo "RUN somescript.sh" >> Dockerfile
$ echo "RUN /tmp/make_iso.sh" >> Dockerfile
$ echo 'CMD ["cat", "boot2docker.iso"]' >> Dockerfile
$ sudo docker build -t my-boot2docker-img .
$ sudo docker run --rm my-boot2docker-img > boot2docker.iso
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。