diff options
| author | Franck Cuny <franck@fcuny.net> | 2021-04-22 14:03:04 -0700 |
|---|---|---|
| committer | Franck Cuny <franck@fcuny.net> | 2022-06-11 13:57:41 -0700 |
| commit | 8686cd5698e42dd1a328f4fed6f77dc103c34275 (patch) | |
| tree | 10e688f6080ce45ac115c31d3ff9d5f3372078b0 /users/fcuny/exp/containerd-to-vm/go.mod | |
| parent | add a lease to the Go context (diff) | |
| download | infra-8686cd5698e42dd1a328f4fed6f77dc103c34275.tar.gz | |
extract layers to a mounted loop device
We create a loop device by pre-allocating space to a file on disk. This
file is then converted to an ext4 partition, which we mount to a
temporary path on the host.
Once this is done, we extract all the layers from the given container on
that mounted path. We also add a few extra files to the image
(`/etc/hosts` and `/etc/resolv.conf`).
When we're done extracting and writing, we run resize2fs in order to
resize the image to a more reasonable size.
Diffstat (limited to 'users/fcuny/exp/containerd-to-vm/go.mod')
| -rw-r--r-- | users/fcuny/exp/containerd-to-vm/go.mod | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/users/fcuny/exp/containerd-to-vm/go.mod b/users/fcuny/exp/containerd-to-vm/go.mod index f4d6398..b033d54 100644 --- a/users/fcuny/exp/containerd-to-vm/go.mod +++ b/users/fcuny/exp/containerd-to-vm/go.mod @@ -9,9 +9,12 @@ require ( github.com/containerd/continuity v0.0.0-20210315143101-93e15499afd5 // indirect github.com/containerd/fifo v0.0.0-20210331061852-650e8a8a179d // indirect github.com/containerd/typeurl v1.0.2 // indirect + github.com/docker/docker v20.10.6+incompatible github.com/gogo/googleapis v1.4.1 // indirect github.com/google/go-cmp v0.5.5 // indirect + github.com/google/renameio v0.1.0 github.com/google/uuid v1.2.0 // indirect + github.com/moby/sys/mount v0.2.0 // indirect github.com/opencontainers/image-spec v1.0.1 github.com/sirupsen/logrus v1.8.1 // indirect golang.org/x/net v0.0.0-20210410081132-afb366fc7cd1 // indirect |
