This repository contains Dockerfiles for building various docker containers. The different containers are described below.
In this repo is a Makefile which stores instructions for how to build each Dockerfile. You can clone this repository, and then type
make CONTAINER, where
CONTAINER is one of the following items described below. Built containers can (usually) also be downloaded from Dockerhub.
A bunch of my containers I wrap with a little shell wrapper so that I can execute their functions in containers easily on the command-line, without having to construct a complicated
docker arguments like volumes, entrypoints, etc.
shny - running a shiny server
I use the
bin/shny executable. Run an app in the shiny server container like so:
Since this is going to
docker exec the
shiny::runApp() function in
R, the container needs to be already running at the moment (start it with
rxgn - Roxygenize in container
Now with permissions preserved!
## `jim` - build and serve a Jekyll website from a container My `jim` container has Ruby, Jekyll, and friends, so I can serve up local jekyll sites for testing without installing Ruby and so forth. Copy the `bin/djserve` script to your bin and then you can serve up any jekyll site with a quick command:
Then visit the site at `http://localhost:4000/` ## liquify This container combines Liquid templates and YAML data to build a simple, command-line templating system. The container just has `ruby` and `liquid` and a simply ruby script. The executable, `bin/liquify`, uses the container to populate a template with data from a yaml file, and spit the output into an outfile. That's it! You can see the command-line options with `liquify -h`:
-t, --template TEMPLATE Liquid template file -d, --data DATA YAML data file -o, --outfile OUTFILE Output file
## `pandocker` - `pandoc` in docker `pandocker` is a containerized drop-in replacement for the `pandoc` executable. I build a container with `pandoc` and a bunch of `latex` prereqs, and then you can just use the `pandocker` executable and it will run your stuff through `pandoc` in the container. I softlinked `pandoc` to `pandocker` and now I don't have to install pandoc or any latex stuff on any of my computers. ## `jabref` I use `bin/jabref` as an executable to run containerized Jabref. This is more convenient than using the Java CLI (`java -jar blah blah`), and also lets me run multiple `jabrefs` at the same time, which is nice, because I can run exports even when `jabref` is already running. I need to do the same with with `libreoffice`, which silently fails on command-line tasks when it's already running. # Non-executable container descriptions ## rim My R production environment, based on the bioconductor Docker containers, then installs a bunch of packages I use regularly (the packages lists are, for example, in [Rsetup/rpack_basic.txt](Rsetup/rpack_basic.txt)). Currently this is the same as rdev. ## rdev My R development environment, for building packages. Comes with everything you need to run `R CMD check` and `R CMD BiocCheck` -- and a couple of helper scripts in `bin/`: This will build, RCheck, and BiocCheck the package, all in a docker container with all dependencies already required.
This will run your unit tests in a docker container:
My docker container to convert Inkscape SVG figures into PDF, and other graphics processing tasks. Under construction.
- put svg2pdfpng in here
- write a wrapper script (a la djserve) to run the conversion in a container
dpipe script in
/bin lets you create slick containerized version of software that will behave in the host OS as if the software were installed locally (it will just handle permissions, setting userID, etc), so that you don't have to install them. As an example, look at
pandocker, which can replace the
pandoc executable if you stick
/bin in your
I should produce other things using the same system.
I'm working on a script to be able to run any of these
script/drun followed by the name of the image.
Installing an R environment
You can also use these to install all these nice R packages in one shot.
gclo nsheff/docker cd code/docker Rscript Rsetup/install_bioconductor.R Rscript Rsetup/install_fonts.R Rscript Rsetup/Rsetup.R Rscript Rsetup/Rsetup.R --packages=Rsetup/rpack_basic.txt Rscript Rsetup/Rsetup.R --packages=Rsetup/rpack_bio.txt