Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/artyom/merge-docker-save
Command to export docker image filesystem from the docker save output.
https://github.com/artyom/merge-docker-save
docker export filesystem
Last synced: about 11 hours ago
JSON representation
Command to export docker image filesystem from the docker save output.
- Host: GitHub
- URL: https://github.com/artyom/merge-docker-save
- Owner: artyom
- License: mit
- Created: 2017-09-16T11:17:42.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2018-05-17T18:07:35.000Z (over 6 years ago)
- Last Synced: 2024-06-20T00:28:26.410Z (5 months ago)
- Topics: docker, export, filesystem
- Language: Go
- Size: 8.79 KB
- Stars: 2
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
Command `merge-docker-save` repacks output of the docker save command called for a single image to a tar stream with merged content of all image layers.
Command `docker save` outputs [docker-specific tar stream](https://github.com/moby/moby/blob/master/image/spec/v1.2.md):
$ docker save alpine:latest | tar tv |head
drwxr-xr-x 0/0 0 2017-09-13 14:32 030cf30aac0be224d6b7e02ca2b7cadf1d078bf90ef1e9656ff54a924a5f163a/
-rw-r--r-- 0/0 3 2017-09-13 14:32 030cf30aac0be224d6b7e02ca2b7cadf1d078bf90ef1e9656ff54a924a5f163a/VERSION
-rw-r--r-- 0/0 1184 2017-09-13 14:32 030cf30aac0be224d6b7e02ca2b7cadf1d078bf90ef1e9656ff54a924a5f163a/json
-rw-r--r-- 0/0 4220928 2017-09-13 14:32 030cf30aac0be224d6b7e02ca2b7cadf1d078bf90ef1e9656ff54a924a5f163a/layer.tar
-rw-r--r-- 0/0 1512 2017-09-13 14:32 76da55c8019d7a47c347c0dceb7a6591144d232a7dd616242a367b8bed18ecbc.json
-rw-r--r-- 0/0 202 1970-01-01 00:00 manifest.json
-rw-r--r-- 0/0 89 1970-01-01 00:00 repositoriesCommand `merge-docker-save` transforms this output to produce tar stream with container filesystem:
$ docker save alpine:latest | merge-docker-save | tar tv |head
drwxr-xr-x 0/0 0 2017-06-25 17:52 bin/
lrwxrwxrwx 0/0 0 2017-06-25 17:52 bin/ash -> /bin/busybox
lrwxrwxrwx 0/0 0 2017-06-25 17:52 bin/base64 -> /bin/busybox
lrwxrwxrwx 0/0 0 2017-06-25 17:52 bin/bbconfig -> /bin/busybox
-rwxr-xr-x 0/0 825504 2017-06-11 06:38 bin/busybox
lrwxrwxrwx 0/0 0 2017-06-25 17:52 bin/cat -> /bin/busybox
lrwxrwxrwx 0/0 0 2017-06-25 17:52 bin/catv -> /bin/busybox
lrwxrwxrwx 0/0 0 2017-06-25 17:52 bin/chgrp -> /bin/busybox
lrwxrwxrwx 0/0 0 2017-06-25 17:52 bin/chmod -> /bin/busybox
lrwxrwxrwx 0/0 0 2017-06-25 17:52 bin/chown -> /bin/busybox## Known limits
Command only supports `docker save` output for a single image, i.e. piping `docker save alpine:latest` works, but `docker save alpine` may not if it outputs multiple images.
This tool uses system default directory to store temporary files, which can be overridden by setting `$TMPDIR` environment.