1 # Dockerfile for Citadel
3 # This container is built on MiniDeb, a stripped down version of Debian for use in containers.
4 # Rehosting on another base Linux image is not expected to create compatibility issues.
5 FROM bitnami/minideb:latest
7 # All long term persistent data goes here. Any volume driver may be used.
10 # Install prerequisites
11 RUN install_packages gcc bison make zlib1g-dev libldap2-dev libssl-dev gettext libical-dev libexpat1-dev curl libcurl4-openssl-dev git autoconf automake netbase libreadline-dev
13 # Build our own local copy of Berkeley DB, because the one included with the system libs is too old.
14 RUN sh -c 'mkdir /tmp/db_build && \
16 curl -k https://easyinstall.citadel.org/db-6.2.32.NC.tar.gz | tar xvzf - && \
17 cd db-6.2.32.NC/build_unix && \
18 ../dist/configure --prefix=/usr/local/ctdlsupport --disable-compat185 --disable-cxx --disable-debug --disable-dump185 --disable-java --disable-tcl --disable-test --without-rpm && \
24 # Deploy "ctdlvisor", a small supervisor program which runs inside the container to wrangle the various services
27 # Download and build Citadel
28 RUN sh -c 'export CFLAGS=-I/usr/local/ctdlsupport/include && \
29 export LDFLAGS="-L/usr/local/ctdlsupport/lib -Wl,--rpath -Wl,/usr/local/ctdlsupport/lib" && \
30 mkdir /tmp/ctdl_build && \
31 cd /tmp/ctdl_build && \
32 git clone git://git.citadel.org/appl/gitroot/citadel.git && \
33 cd /tmp/ctdl_build/citadel/libcitadel && \
35 ./configure --prefix=/usr && \
38 cd /tmp/ctdl_build/citadel/citadel && \
43 cd /tmp/ctdl_build/citadel/webcit && \
48 cd /tmp/ctdl_build/citadel/textclient && \
50 ./configure --prefix=/usr --ctdldir=/citadel_data && \
51 make && make install && \
53 cc ctdlvisor.c -o /usr/local/bin/ctdlvisor && \
54 rm -vf /tmp/ctdlvisor.c && \
56 rm -vfr /tmp/ctdl_build && \
57 rm -vrf /usr/local/citadel/data /usr/local/citadel/files /usr/local/citadel/keys /usr/local/webcit/keys'
60 EXPOSE 25 80 110 119 143 443 465 504 563 587 993 995 2020 5222
63 ENTRYPOINT ["/usr/local/bin/ctdlvisor"]