Is it possible to convert an .img
file containing an OS (Arch Linux) into a Docker image? More precisely I want to dockerize a RuneAudio Raspberry Pi image.
相关问题
- Docker task in Azure devops won't accept "$(pw
- Unable to run mariadb when mount volume
- Unspecified error (0x80004005) while running a Doc
- What would prevent code running in a Docker contai
- How to reload apache in php-apache docker containe
Producing a Docker image from a full operating system image is often a sub-optimal process. The operating system image is going to include a variety of things that are simply not necessary in the Docker environment, which simply means that the resulting image is going to be unnecessarily large.
That said, if you want to try this anyway, the
guestfish
command from the libguestfs package makes this very simple:That will create a
runeaudio
docker image with the contents of theRuneAudio_rpi_0.3-beta_20141029_2GB.img
disk image. Note that this will, of course, only run under Docker running on a Raspberry Pi, and the resulting image isn't necessarily going to work without further modification.You can also accomplish the same thing by mounting the disk image locally:
I like
guestfish
because it doesn't require root access, and doesn't require mucking about with loop devices and mountpoints, so there's less setup and cleanup.