From 660d3bbf8eccd819f86988f323ed0f5e1b5f18b9 Mon Sep 17 00:00:00 2001 From: Robert Carlsen Date: Mon, 3 Aug 2015 15:35:31 -0500 Subject: [PATCH] docker build --- Makefile | 3 +++ README.rst | 13 ++++++++++++- docker/README.rst | 8 ++++++++ docker/fuelcycle.org-deps/Dockerfile | 12 ++++++++++++ 4 files changed, 35 insertions(+), 1 deletion(-) create mode 100644 docker/README.rst create mode 100644 docker/fuelcycle.org-deps/Dockerfile diff --git a/Makefile b/Makefile index 6faa71fee..4240b76dd 100644 --- a/Makefile +++ b/Makefile @@ -47,6 +47,9 @@ help: @echo " linkcheck to check all external links for integrity" @echo " doctest to run all doctests embedded in the documentation (if enabled)" +html-docker gh-preview-docker: + docker run -w /cyclus.github.com -v $(PWD):/cyclus.github.com cyclus/fuelcycle.org-deps make gh-preview + gh-clean gh-revert clean: -rm -rf $(BUILDDIR) diff --git a/README.rst b/README.rst index f6cdc0739..17b5c8832 100644 --- a/README.rst +++ b/README.rst @@ -47,6 +47,11 @@ branch, you may always run:: make html +Or if you have docker, you can forget about the other dependencies and just +run:: + + make html-docker + Best practice workflow for contributing to site changes -------------------------------------------------------- @@ -70,7 +75,13 @@ Best practice workflow for contributing to site changes This will build a version of the site in the `gh-build` directory of your branch, `add_some_info`. You can load it directly in a local - browser. + browser. Or if you have docker installed, you can optionally use the + docker preview target: + + ``make gh-preview-docker`` + + to build the website inside a docker container with all the correct + dependencies and configuration taken care of automagically. 6. Repeat steps 4-5 until satisfied. diff --git a/docker/README.rst b/docker/README.rst new file mode 100644 index 000000000..f58b0d2ea --- /dev/null +++ b/docker/README.rst @@ -0,0 +1,8 @@ + +``fuelcycle.org-deps`` contains a dockerfile with all dependencies for +building cymetric. This is used by the docker based build targets added to +the makefile. This image will need to be updated and repushed to docker hub +periodically when dependencies for the website need updating. Particularly, +this image will need to be rebuilt whenever there is a new release of +cyclus+cycamore. + diff --git a/docker/fuelcycle.org-deps/Dockerfile b/docker/fuelcycle.org-deps/Dockerfile new file mode 100644 index 000000000..d43f8fe77 --- /dev/null +++ b/docker/fuelcycle.org-deps/Dockerfile @@ -0,0 +1,12 @@ + +FROM cyclus/cycamore + +RUN apt-get install -y --force-yes python3-pip +RUN pip3 install sphinx sphinxcontrib-bibtex cloud-sptheme + +WORKDIR / +RUN git clone https://github.com/cyclus/cymetric +WORKDIR /cymetric +RUN python setup.py install +WORKDIR / +