Skip to content
This repository has been archived by the owner on Jan 10, 2023. It is now read-only.

docker版,tar命令无 --preserve-permissions参数 #1

Closed
tanzhixu opened this issue Apr 10, 2018 · 4 comments
Closed

docker版,tar命令无 --preserve-permissions参数 #1

tanzhixu opened this issue Apr 10, 2018 · 4 comments

Comments

@tanzhixu
Copy link

cd /tmp/simu/go-test-20180410-101436 && tar --preserve-permissions -czf /tmp/simu/go-test-20180410-101436.tar.gz .

执行结果:
tar: unrecognized option: preserve-permissions
BusyBox v1.27.2 (2017-12-12 10:41:50 GMT) multi-call binary.

Usage: tar -[cxtZzJjahmvO] [-X FILE] [-T FILE] [-f TARFILE] [-C DIR] [FILE]...

Create, extract, or list files from a tar file

Operation:
c Create
x Extract
t List
f Name of TARFILE ('-' for stdin/out)
C Change to DIR before operation
v Verbose
Z (De)compress using compress
z (De)compress using gzip
J (De)compress using xz
j (De)compress using bzip2
a (De)compress using lzma
O Extract to stdout
h Follow symlinks
m Don't restore mtime
exclude File to exclude
X File with names to exclude
T File with names to include

错误:exit status 1

=============

@gaoyue1989
Copy link
Collaborator

使用的镜像不支持此命令,现在docker版已经去掉,可以重新拉去最新镜像

@linclin
Copy link
Owner

linclin commented Apr 10, 2018

以前是用centos做基础镜像,由于镜像超过1.4G,替换了alpine基础镜像,alpine镜像不支持此命令.已去掉此参数

@linclin linclin closed this as completed Apr 10, 2018
@tanzhixu
Copy link
Author

用的就是最新版,k8s yaml里写的:lc13579443/gopub:latest

@linclin
Copy link
Owner

linclin commented Apr 10, 2018

重新拉取一下,新打包的镜像

# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants