Using R package remotes instead of devtools will accelerate the Docker build process.
remotes
devtools