Skip to content

Commit 10fa4af

Browse files
committed
Updated dockerfile, docker-init.sh, updatedb script, and a new docker/build script.
- Legacy-Id: 12281
1 parent 927d01f commit 10fa4af

3 files changed

Lines changed: 24 additions & 1 deletion

File tree

docker/Dockerfile

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,13 +32,20 @@ RUN echo "deb http://http.debian.net/debian wheezy-backports main contrib non-fr
3232
ENV DEBIAN_FRONTEND=noninteractive
3333

3434
# Install needed packages
35+
#
36+
# We're not including graphviz and ghostscript, needed for the 3 document
37+
# dependency graph tests; they would increase the size of the image by about
38+
# 15%, about 100MB.
39+
#
3540
RUN apt-get update && apt-get install -qy \
3641
bzip2 \
3742
ca-certificates \
3843
colordiff \
3944
gawk \
4045
ipython \
4146
less \
47+
libfreetype6 \
48+
libfontconfig \
4249
libjpeg8-dev \
4350
libmysqlclient-dev \
4451
libsvn1/wheezy-backports \
@@ -52,6 +59,8 @@ RUN apt-get update && apt-get install -qy \
5259
python \
5360
python-dev \
5461
python-m2crypto \
62+
python-subversion \
63+
realpath \
5564
rsync \
5665
subversion/wheezy-backports \
5766
sudo \
@@ -77,6 +86,13 @@ RUN wget -q https://bootstrap.pypa.io/get-pip.py && python get-pip.py && rm get-
7786
RUN pip install certifi
7887
RUN pip install virtualenv
7988

89+
# Phantomjs
90+
WORKDIR /usr/local
91+
RUN wget -q https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-1.9.7-linux-x86_64.tar.bz2 \
92+
&& tar xjf phantomjs-1.9.7-linux-x86_64.tar.bz2
93+
WORKDIR /usr/local/bin
94+
RUN ln -s /usr/local/phantomjs-1.9.7-linux-x86_64/bin/phantomjs .
95+
8096
# idnits and dependencies
8197
RUN wget -q -P /usr/local/bin/ https://tools.ietf.org/tools/idnits/idnits && chmod +x /usr/local/bin/idnits
8298

docker/docker-init.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,14 @@ if [ ! -f $VIRTDIR/bin/activate ]; then
7676
chown $USER /opt/home/$USER
7777
mkdir $VIRTDIR
7878
virtualenv --system-site-packages $VIRTDIR
79+
echo -e "
80+
# This is from $VIRTDIR/bin/activate, to activate the
81+
# datatracker virtual python environment on docker container entry:
82+
" >> /etc/bash.bashrc
7983
cat $VIRTDIR/bin/activate >> /etc/bash.bashrc
8084
cat /usr/local/share/datatracker/setprompt >> /etc/bash.bashrc
85+
else
86+
echo "Using virtual environment at $VIRTDIR"
8187
fi
8288

8389
echo "Activating the virtual python environment ..."

docker/updatedb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,8 @@ DATADIR=$parent/data
120120
# fi
121121

122122
echo "Fetching database dump ..."
123-
wget -N -P $DATADIR http://www.ietf.org/lib/dt/sprint/ietf_utf8.sql.gz
123+
wget -S -N -P $DATADIR http://www.ietf.org/lib/dt/sprint/ietf_utf8.sql.gz || die "No new data, quitting."
124+
#rsync -u --progress zin.tools.ietf.org::tools/tools/ietf_utf8.sql.gz $DATADIR/ || die "No new data, quitting."
124125

125126
echo "Loading database ..."
126127
gunzip < $DATADIR/ietf_utf8.sql.gz \

0 commit comments

Comments
 (0)