Unknown flag: chown

1 개요[ | ]

root@localhost:~/docker# ll
total 16
drwxr-xr-x  2 root root 4096 Dec 20 13:22 ./
drwx------ 20 root root 4096 Dec 20 13:22 ../
-rw-r--r--  1 root root   62 Dec 20 13:22 Dockerfile
-rw-r--r--  1 root root    6 Dec 20 13:21 hello.txt
root@localhost:~/docker# cat Dockerfile
FROM busybox:1.24
COPY --chown=33:33 hello.txt /tmp/hello.txt
root@localhost:~/docker# cat hello.txt
world

2 1.12[ | ]

root@localhost:~/docker# docker -v
Docker version 1.12.6, build 85d7426/1.12.6
root@localhost:~/docker# docker build -t hello-busybox .
Sending build context to Docker daemon 3.072 kB
Step 1 : FROM busybox:1.24
Trying to pull repository busybox ...
1.24: Pulling from busybox
Digest: sha256:d2af0ba9eb4c9ec7b138f3989d9bb0c9651c92831465eae281430e2b254afe0d
 ---> e7d168d7db45
Step 2 : COPY --chown=33:33 hello.txt /tmp/hello.txt
Unknown flag: chown

3 18.09[ | ]

root@localhost:~/docker# docker -v
Docker version 18.09.6, build 481bc77
root@localhost:~/docker# docker build -t hello-busybox .
Sending build context to Docker daemon  3.072kB
Step 1/2 : FROM busybox:1.24
1.24: Pulling from library/busybox
385e281300cc: Pull complete
a3ed95caeb02: Pull complete
Digest: sha256:8ea3273d79b47a8b6d018be398c17590a4b5ec604515f416c5b797db9dde3ad8
Status: Downloaded newer image for busybox:1.24
 ---> 47bcc53f74dc
Step 2/2 : COPY --chown=33:33 hello.txt /tmp/hello.txt
 ---> 1f893235b1e1
Successfully built 1f893235b1e1
Successfully tagged hello-busybox:latest

4 같이 보기[ | ]

5 참고[ | ]

문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}