The instruction below is correctly built in MacOS Docker Engine 18.04 while the same instruction fails when built in by a Jenkins Container running Docker (Docker-in-Docker, dind, Inception)... Why is the reason for the error and what's the workaround?
local docker build on MacOS
Step 12/16 : RUN find / -name "spring-cloud-config-server*.jar"
! -name "*sources*" -exec cp -t /tmp {} + &&
mkdir /runtime &&
mv /tmp/spring-cloud-config*.jar /runtime/config-service.jar &&
rm -f /*.jar
---> Using cache
Docker-in-Docker Jenkins Build
Step 12/16 : RUN find / -name "spring-cloud-config-server*.jar"
! -name "*sources*" -exec cp -t /tmp {} + &&
mkdir /runtime &&
mv /tmp/spring-cloud-config*.jar /runtime/config-service.jar &&
rm -f /*.jar
---> Running in f64908a07aa1
find: ‘/proc/1/map_files’: Operation not permitted
find: ‘/proc/7/map_files’: Operation not permitted
The command '/bin/sh -c find / -name "spring-cloud-config-server*.jar"
! -name "*sources*" -exec cp -t /tmp {} + && mkdir /runtime &&
mv /tmp/spring-cloud-config*.jar /runtime/config-service.jar &&
rm -f /*.jar' returned a non-zero code: 1
script returned exit code 1