Skip to content

`libguestfs` and its tools in a minimal Alpine-based Docker image. Usable in Mac OS.

License

Notifications You must be signed in to change notification settings

maximsmol/libguestfs-docker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

libguestfs in Docker

libguestfs and its tools in a minimal Alpine-based Docker image. Usable in Mac OS.

Available on Docker Hub.

Usage

The target VM image needs to be mounted into the container.

Example wrapper scripts are provided.

Interactive guestfish Session

docker run \
  --interactive \
  --tty \
  --privileged `# for QEMU KVM` \
  --mount "type=bind,source=${dir},target=/mnt" \
  maximsmol/libguestfs:latest \
  guestfish \
    --rw \
    --add "/mnt/${base}" \
    --inspector

Running a Command

docker run \
  --privileged `# for QEMU KVM` \
  --mount "type=bind,source=${dir},target=/mnt" \
  --mount "type=bind,source=${src},target=/src/${src_base}" \
  maximsmol/libguestfs:latest \
  guestfish \
    --rw \
    --add "/mnt/${base}" \
    --inspector \
<<EOF
  copy-in "/src/${src_base}" "${dst}"
  umount-all
EOF

Building

./build_and_push.bash

About

`libguestfs` and its tools in a minimal Alpine-based Docker image. Usable in Mac OS.

Topics

Resources

License

Stars

Watchers

Forks