I'm porting a script from ubuntu to alpine linux 3.4 (docker image). I can't seem to find a way to do "cp --backup=numbered" in alpine. Is there any way to install a more complete "cp"? Thanks
2 Answers
I think I found the answer to this one...
apk add --upgrade coreutils
It seems that --backup is an option of GNU coreutils, which is not installed by default in the alpine linux 3.4 docker image.
Adding it via the command above sorted it.
Alpine Linux uses busybox, which has a built-in cp command, as well as other commands. For GNU commands, they can be easily installed via apk package manager.