update README and misc files
This commit is contained in:
parent
6c24b7f833
commit
2f484824fb
@ -17,7 +17,7 @@ tools: lxc, systemd-nspawn or systemd itself.
|
|||||||
Usage -- extract docker image
|
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
|
skopeo copy docker://docker.io/busybox:latest docker-archive:busybox.tar
|
||||||
|
2
main.go
2
main.go
@ -11,7 +11,7 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
const _usage = `Usage:
|
const _usage = `Usage:
|
||||||
%s <INFILE> <OUTFILE>
|
%s <infile> <outfile>
|
||||||
|
|
||||||
Flatten a Docker container image to a root file system.
|
Flatten a Docker container image to a root file system.
|
||||||
|
|
||||||
|
@ -44,12 +44,12 @@ func TestExecute(t *testing.T) {
|
|||||||
{
|
{
|
||||||
name: "infile does not exist",
|
name: "infile does not exist",
|
||||||
infile: "t3-does-not-exist.txt",
|
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",
|
name: "outpath dir not writable",
|
||||||
outfile: filepath.Join("t4", "does", "not", "exist"),
|
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",
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -229,7 +229,10 @@ func whiteoutDirs(whreaddir map[string]int, nlayers int) []*tree {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// validateManifest
|
// validateManifest
|
||||||
func validateManifest(layerOffsets map[string]int64, manifest dockerManifestJSON) error {
|
func validateManifest(
|
||||||
|
layerOffsets map[string]int64,
|
||||||
|
manifest dockerManifestJSON,
|
||||||
|
) error {
|
||||||
if len(manifest) == 0 {
|
if len(manifest) == 0 {
|
||||||
return fmt.Errorf("empty or missing manifest")
|
return fmt.Errorf("empty or missing manifest")
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user