Skip to content

Latest commit

 

History

History
53 lines (34 loc) · 1.94 KB

README.md

File metadata and controls

53 lines (34 loc) · 1.94 KB

Compress

Docker container to compress/decompress data (ZIP, gzip, 7zip, bzip2...).

Dockerfile Docker Build Docker Stars Docker Pulls Docker Version

Example without using the filesystem

Let's say that you have a file foo.txt in your current working directory that you want to compress:

Mac/Linux

cat foo.txt | docker run --rm -i --net=none leplusorg/compress gzip -c - > foo.txt.gz

Windows

type foo.txt | docker run --rm -i --net=none leplusorg/compress gzip -c - > foo.txt.gz

Example using the filesystem

Same thing, assuming that you have a file foo.txt in your current working directory that you want to compress:

Mac/Linux

docker run --rm -t --user="$(id -u):$(id -g)" --net=none -v "$(pwd):/tmp" leplusorg/compress gzip /tmp/foo.txt

Windows

In cmd:

docker run --rm -t --net=none -v "%cd%:/tmp" leplusorg/compress gzip /tmp/foo.txt

In PowerShell:

docker run --rm -t --net=none -v "${PWD}:/tmp" leplusorg/compress gzip /tmp/foo.txt

Request new tool

Please use this link (GitHub account required) to request that a new tool be added to the image. I am always interested in adding new capabilities to these images.