I know that this is probably bizarre to to do this, but I coulnd't find anywhere else to ask. You managed to install devtools using the normal way, but for some reason, some of my packages (specifically devtools and sf) do not install this way. Why? What in your code allowed all the packages to be installed properly. I have a simple code with just
BootStrap: docker From: r-base:4.3.2
R -e "install.packages('raster')" # worked
R -e "install.packages('devtools')" # worked
R -e "install.packages('sf')" # worked