When I use the docker cp command to copy a file to a running docker container the user id and group for the new file are set to root:root. Is there a way to copy and set the user id and group to some user, i.e. steve:steve using the cp command?
Currently I am attaching to the container and running chown on the new file but I would like to eliminate this step if possible. I tried:
docker cp .bashrc steve@hopeful_brahmagupta:/home/steve/