-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathDockerfile
More file actions
100 lines (81 loc) · 3.55 KB
/
Dockerfile
File metadata and controls
100 lines (81 loc) · 3.55 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
#################################################
# Get some basic config sorted out
#################################################
FROM debian:wheezy
MAINTAINER Christophe Gueret <christophe.gueret@bbc.co.uk>
ENV DEBIAN_FRONTEND noninteractive
ENV TERM xterm
RUN apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 9E16A4D302DA096A && \
echo "deb [arch=amd64] http://apt.bbcarchdev.net/debian/ wheezy main ports live stage dev" \
>> /etc/apt/sources.list.d/bbcarchdev-wheezy.list
# Install additional tools for some debugging, running the remote, etc
RUN apt-get -y update && apt-get install -y --no-install-recommends \
python3 python3-psycopg2 netcat netcat-traditional vim mc ngrep \
procps tcpdump supervisor postgresql-client
RUN apt-get -y install libcunit1-ncurses-dev \
gdb \
valgrind
#################################################
# Install Apache for running Quilt
#################################################
# Install Apache
RUN apt-get -y update && apt-get install -y --no-install-recommends \
apache2 libapache2-mod-fcgid
RUN rm -rf /var/lib/apt/lists/*
# Configure Apache to connect with Quilt FCGI and expose the port 80
ENV APACHE_RUN_USER=www-data \
APACHE_RUN_GROUP=www-data \
APACHE_LOG_DIR=/var/log/apache2 \
APACHE_PID_FILE=/var/run/apache2.pid \
APACHE_RUN_DIR=/var/run/apache2 \
APACHE_LOCK_DIR=/var/lock/apache2
RUN a2enmod rewrite
RUN a2enmod fcgid
#################################################
# Acropolis
#################################################
WORKDIR /usr/local/src
# Install dependencies
RUN apt-get -y update && apt-get install -y --no-install-recommends \
build-essential libtool libltdl-dev automake \
autoconf pkg-config libcurl4-gnutls-dev autotools-dev \
libraptor2-dev librasqal3-dev librdf0-dev libfcgi-dev \
libjansson-dev libxml2-dev libssl-dev \
flex gettext python-libxml2 libpq-dev libmysqlclient-dev \
uuid-dev libncurses5-dev libedit-dev \
&& rm -rf /var/lib/apt/lists/*
# Copy the source tree
COPY . /usr/local/src
# Compile everything
RUN autoreconf -i --force \
&& ./configure --prefix=/usr --enable-debug --disable-docs \
&& make clean \
&& make \
&& make install
#RUN make check
# Remove default configuration files and link to adjusted configuration
# files for the different components
RUN rm -f /usr/etc/twine.conf \
&& rm -f /usr/etc/quilt.conf \
&& rm -f /usr/etc/crawl.conf \
&& ln -s /usr/local/src/config/crawl.conf /usr/etc/crawl.conf \
&& ln -s /usr/local/src/config/twine-generate.conf /usr/etc/twine-generate.conf \
&& ln -s /usr/local/src/config/twine-correlate.conf /usr/etc/twine-correlate.conf \
&& ln -s /usr/local/src/config/quilt.conf /usr/etc/quilt.conf \
&& ln -s /usr/local/src/docker/twine.conf /usr/etc/twine.conf \
&& ln -s /usr/local/src/docker/twine-anansi.conf /usr/etc/twine-anansi.conf \
&& ln -s /usr/local/src/docker/supervisord.conf /etc/supervisor/conf.d/acropolis.conf
# Finish configuring Apache
RUN cp /usr/share/doc/quilt/apache2-example.conf /etc/apache2/sites-available/quilt \
&& sed -i -e 's|data\.example\.com|localhost|' /etc/apache2/sites-available/quilt \
&& a2dissite 000-default && a2ensite quilt
RUN ln -sf /dev/stdout /var/log/apache2/quilt.access.log \
&& ln -sf /dev/stderr /var/log/apache2/quilt.error.log \
&& ln -sf /dev/stderr /var/log/apache2/error.log
#################################################
# Run the services
#################################################
# Set an entry script to wait until S3, Postgres and 4store are ready
COPY docker /usr/local/src/
# Do nothing by default
CMD ["tail", "-f", "/dev/null"]