diff --git a/docker/Dockerfile b/docker/Dockerfile index a6bad82fd..edafeec24 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -32,6 +32,11 @@ RUN echo "deb http://http.debian.net/debian wheezy-backports main contrib non-fr ENV DEBIAN_FRONTEND=noninteractive # Install needed packages +# +# We're not including graphviz and ghostscript, needed for the 3 document +# dependency graph tests; they would increase the size of the image by about +# 15%, about 100MB. +# RUN apt-get update && apt-get install -qy \ bzip2 \ ca-certificates \ @@ -39,6 +44,8 @@ RUN apt-get update && apt-get install -qy \ gawk \ ipython \ less \ + libfreetype6 \ + libfontconfig \ libjpeg8-dev \ libmysqlclient-dev \ libsvn1/wheezy-backports \ @@ -52,6 +59,8 @@ RUN apt-get update && apt-get install -qy \ python \ python-dev \ python-m2crypto \ + python-subversion \ + realpath \ rsync \ subversion/wheezy-backports \ sudo \ @@ -77,6 +86,13 @@ RUN wget -q https://bootstrap.pypa.io/get-pip.py && python get-pip.py && rm get- RUN pip install certifi RUN pip install virtualenv +# Phantomjs +WORKDIR /usr/local +RUN wget -q https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-1.9.7-linux-x86_64.tar.bz2 \ + && tar xjf phantomjs-1.9.7-linux-x86_64.tar.bz2 +WORKDIR /usr/local/bin +RUN ln -s /usr/local/phantomjs-1.9.7-linux-x86_64/bin/phantomjs . + # idnits and dependencies RUN wget -q -P /usr/local/bin/ https://tools.ietf.org/tools/idnits/idnits && chmod +x /usr/local/bin/idnits diff --git a/docker/docker-init.sh b/docker/docker-init.sh index 8cf7d055f..67d727847 100644 --- a/docker/docker-init.sh +++ b/docker/docker-init.sh @@ -76,8 +76,14 @@ if [ ! -f $VIRTDIR/bin/activate ]; then chown $USER /opt/home/$USER mkdir $VIRTDIR virtualenv --system-site-packages $VIRTDIR + echo -e " +# This is from $VIRTDIR/bin/activate, to activate the +# datatracker virtual python environment on docker container entry: +" >> /etc/bash.bashrc cat $VIRTDIR/bin/activate >> /etc/bash.bashrc cat /usr/local/share/datatracker/setprompt >> /etc/bash.bashrc +else + echo "Using virtual environment at $VIRTDIR" fi echo "Activating the virtual python environment ..." diff --git a/docker/updatedb b/docker/updatedb index 6209101ac..55fb91910 100755 --- a/docker/updatedb +++ b/docker/updatedb @@ -120,7 +120,8 @@ DATADIR=$parent/data # fi echo "Fetching database dump ..." -wget -N -P $DATADIR http://www.ietf.org/lib/dt/sprint/ietf_utf8.sql.gz +wget -S -N -P $DATADIR http://www.ietf.org/lib/dt/sprint/ietf_utf8.sql.gz || die "No new data, quitting." +#rsync -u --progress zin.tools.ietf.org::tools/tools/ietf_utf8.sql.gz $DATADIR/ || die "No new data, quitting." echo "Loading database ..." gunzip < $DATADIR/ietf_utf8.sql.gz \