update README and misc files

This commit is contained in:
Motiejus Jakštys 2021-05-24 00:11:58 +03:00
parent 6c24b7f833
commit 2f484824fb
4 changed files with 8 additions and 5 deletions

View File

@ -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

View File

@ -11,7 +11,7 @@ import (
)
const _usage = `Usage:
%s <INFILE> <OUTFILE>
%s <infile> <outfile>
Flatten a Docker container image to a root file system.

View File

@ -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",
},
}

View File

@ -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")
}