This changes the long-standing bug of copy operations not preserving the
UID/GID information after the files arrive to the container.
Signed-off-by: Erik Hollensbe <github@hollensbe.org>
- Move *one-shot* (one use) function where it is actually used (easier
to know what's going on).
- Remove `pullImageIfNotExist` function as it might be an artifact
from way back. We don't need it as we already have frozen/loaded
image of busybox.
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
This corrects `docker cp` behavior when user namespaces are enabled.
Instead of chown'ing copied-in files to real root (0,0), the code
queries for the remapped root uid & gid and sets the chown option
properly.
Docker-DCO-1.1-Signed-off-by: Phil Estes <estesp@linux.vnet.ibm.com> (github: estesp)