File ownership after docker cp

前端 未结 4 2089

How can I control which user owns the files I copy in and out of a container?

The docker cp command says this about file ownership:

The cp

4条回答
  •  借酒劲吻你
    2021-02-19 23:42

    You can also change the ownership by logging in as root user into the container :

    docker exec -it --user root  /bin/bash
    chown -R : 
    

提交回复
热议问题