The deps package gives you a lightweight option to manage package dependencies and you can install these inside containers.
Continue reading: Manage Dependencies with the deps R Package for Docker …