Skip to content

Commit 10cd9b4

Browse files
committed
This is just an initial concept to break apart our Docker files.
This addresses #29, and gives us a `base` image that just has the Python environment, VCS tools, and a couple other standard utilities. Then it has a `full` image that adds all of the PDF/C libraries/etc. This is where most of the time and bloat comes from, and isn't actually required for most testing, HTML builds, conda builds, and lots of other use cases. This would allow us to interate and test base builds faster, while keeping the environment the same in production. NOTE: I'm mostly looking for feedback on this PR, not specific nitpicking.
1 parent 5b02ef2 commit 10cd9b4

File tree

2 files changed

+63
-0
lines changed

2 files changed

+63
-0
lines changed

base/Dockerfile

+42
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# Read the Docs - Sphinx Only Image
2+
#
3+
# This image only has a base sphinx and python environment.
4+
# It can't create PDF's and doesn't have special C libraries.
5+
6+
FROM ubuntu:16.04
7+
MAINTAINER Read the Docs <[email protected]>
8+
LABEL version="latest"
9+
10+
ENV DEBIAN_FRONTEND noninteractive
11+
ENV APPDIR /app
12+
ENV LANG C.UTF-8
13+
14+
# System dependencies
15+
RUN apt-get -y update
16+
RUN apt-get -y install vim software-properties-common python-setuptools \
17+
python3-setuptools python3 python3-pip python-dev python3-dev
18+
19+
# Version control and basic building utilies
20+
RUN apt-get -y install bzr subversion git-core mercurial build-essential
21+
22+
# from readthedocs.build
23+
RUN apt-get -y install graphviz graphviz-dev pandoc doxygen
24+
25+
RUN easy_install3 pip
26+
RUN easy_install pip
27+
RUN pip3 install -U virtualenv auxlib
28+
RUN pip2 install -U virtualenv auxlib
29+
30+
# UID and GID from readthedocs/user
31+
RUN groupadd --gid 205 docs
32+
RUN useradd -m --uid 1005 --gid 205 docs
33+
34+
USER docs
35+
36+
# Install miniconda as docs user
37+
WORKDIR /home/docs
38+
RUN curl -O https://repo.continuum.io/miniconda/Miniconda2-4.3.11-Linux-x86_64.sh
39+
RUN bash Miniconda2-4.3.11-Linux-x86_64.sh -b -p /home/docs/miniconda2/
40+
env PATH $PATH:/home/docs/miniconda2/bin
41+
42+
CMD ["/bin/bash"]

full/Dockerfile

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Read the Docs - Environment base
2+
FROM readthedocs/base:latest
3+
MAINTAINER Read the Docs <[email protected]>
4+
LABEL version="2.0"
5+
6+
# from readthedocs.common
7+
RUN apt-get -y install libpq-dev libxml2-dev libxslt-dev libxslt1-dev postgresql-client libmysqlclient-dev
8+
9+
# from readthedocs.build
10+
RUN apt-get -y install libfreetype6 g++ sqlite libevent-dev libffi-dev \
11+
libenchant1c2a curl texlive-full python-m2crypto python-matplotlib \
12+
python-numpy python-scipy python-pandas graphviz graphviz-dev \
13+
libgraphviz-dev pandoc doxygen latex-cjk-chinese-arphic-gbsn00lp \
14+
latex-cjk-chinese-arphic-gkai00mp latex-cjk-chinese-arphic-bsmi00lp \
15+
latex-cjk-chinese-arphic-bkai00mp python3 python3-dev python3-pip \
16+
python3-matplotlib python3-numpy python3-scipy python3-pandas \
17+
texlive-latex-extra texlive-fonts-recommended pkg-config libjpeg-dev \
18+
libfreetype6-dev libtiff5-dev libjpeg8-dev zlib1g-dev liblcms2-dev \
19+
libwebp-dev libcairo2-dev
20+
21+
CMD ["/bin/bash"]

0 commit comments

Comments
 (0)