Hi Paul -- the approach we've taken is to provide an image with the system dependencies required to install 'all of' Bioconductor, and then to make it relatively easy to persist installations across container invocation. So I did
/tmp$ mkdir mylibs
/tmp$ docker run -it --rm -v /tmp/mylibs:/usr/local/lib/R/host-site-library bioconductor/bioconductor_docker:devel R -e "options(Ncpus = 8); BiocManager::install('VariantAnnotation', ask = FALSE)"
Then a quick trip to the coffee shop and when I came back I could quickly
/tmp$ docker run -it --rm -v /tmp/mylibs:/usr/local/lib/R/host-site-library bioconductor/bioconductor_docker:devel R
and have access to my installed packages (also through RStudio). The basics are at http://bioconductor.org/help/docker/#mounting .
One fun thing to note is that at least some packages are installed as 'binaries' from RStudio, hence quickly; we'd like to extend that to Bioconductor packages.
If you were wanting to make a Docker image with VariantAnnotation installed, e.g., to share with less enabled colleagues, then I'd clone the repository you mention, at https://github.com/Bioconductor/bioconductor_docker, edit the install.R script, build the image and push to dockerhub or similar for sharing. Maybe https://bioconductor.org/help/docker/#modify is a little more formal about this approach.