From 2f484824fb66abcca8497bfacb320abf27fe3669 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Motiejus=20Jak=C5=A1tys?= Date: Mon, 24 May 2021 00:11:58 +0300 Subject: [PATCH] update README and misc files --- README.md | 2 +- main.go | 2 +- main_test.go | 4 ++-- rootfs/rootfs.go | 5 ++++- 4 files changed, 8 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 703e2a9..cc2f969 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,7 @@ tools: lxc, systemd-nspawn or systemd itself. Usage -- extract docker image ----------------------------- -Download `nginx` docker image from docker hub and convert it to a rootfs: +Download `busybox` docker image from docker hub and convert it to a rootfs: ``` skopeo copy docker://docker.io/busybox:latest docker-archive:busybox.tar diff --git a/main.go b/main.go index 712bfc1..62e135c 100644 --- a/main.go +++ b/main.go @@ -11,7 +11,7 @@ import ( ) const _usage = `Usage: - %s + %s Flatten a Docker container image to a root file system. diff --git a/main_test.go b/main_test.go index 7b7aac0..b49ed40 100644 --- a/main_test.go +++ b/main_test.go @@ -44,12 +44,12 @@ func TestExecute(t *testing.T) { { name: "infile does not exist", infile: "t3-does-not-exist.txt", - wantErr: "^open .*t3-does-not-exist.txt: no such file or directory$", + wantErr: "^open .*not-exist.txt: no such file or directory$", }, { name: "outpath dir not writable", outfile: filepath.Join("t4", "does", "not", "exist"), - wantErr: "^create: open .*/t4/does/not/exist: no such file or directory", + wantErr: "^create: open .*not/exist: no such file or directory", }, } diff --git a/rootfs/rootfs.go b/rootfs/rootfs.go index 9264a9d..7ea0ae6 100644 --- a/rootfs/rootfs.go +++ b/rootfs/rootfs.go @@ -229,7 +229,10 @@ func whiteoutDirs(whreaddir map[string]int, nlayers int) []*tree { } // validateManifest -func validateManifest(layerOffsets map[string]int64, manifest dockerManifestJSON) error { +func validateManifest( + layerOffsets map[string]int64, + manifest dockerManifestJSON, +) error { if len(manifest) == 0 { return fmt.Errorf("empty or missing manifest") }