docker-library / busybox

Docker Official Image packaging for Busybox
http://busybox.net
396 stars 127 forks source link

tar broken pipe #68

Closed kaktus42 closed 5 years ago

kaktus42 commented 5 years ago

When executing docker run --rm -v ldaps_ldap-config:/volume -v /tmp/tmp.VznAcI3PTA:/backup busybox tar c -Jvf /backup/ldap-config.tar /volume

I always get the following output:

BusyBox v1.31.0 (2019-07-16 01:13:11 UTC) multi-call binary.

Usage: xz -d [-cfk] [FILE]...

Decompress FILE (or stdin)

    -d  Decompress
    -c  Write to stdout
    -f  Force
    -k  Keep input files
tar: write error: Broken pipe

I use the following versions:

Docker version 18.06.3-ce, build d7080c1
BusyBox v1.31.0 (2019-07-16 01:13:11 UTC) multi-call binary.

Is this because of busybox or am I doing something wrong?

How can I fix this?

tianon commented 5 years ago

That's busybox's xz binary telling you it doesn't support compression, so you won't be able to use -J in this way from busybox.