X-Git-Url: https://code.citadel.org/?p=citadel-docker.git;a=blobdiff_plain;f=Dockerfile;fp=Dockerfile;h=cf9baea3d997f6ed8ccd4645877541d54000e7bb;hp=8dc69f82e0e847ad8da475e2735276bbe1a3a574;hb=f8943c6f2597101db46064435ef6a2af09cd0d79;hpb=468759f5d6d26de920f6be16f6776607f99dafe3 diff --git a/Dockerfile b/Dockerfile index 8dc69f8..cf9baea 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,3 +1,5 @@ +# Dockerfile for Citadel + FROM bitnami/minideb:latest VOLUME /citadel-data @@ -5,25 +7,41 @@ VOLUME /citadel-data # Install prerequisites RUN install_packages make build-essential zlib1g-dev libldap2-dev libssl-dev gettext libical-dev libexpat1-dev curl libcurl4-openssl-dev git autoconf automake netbase libreadline-dev -# Download and build Citadel -WORKDIR /tmp/ctdl_build -RUN sh -c 'git clone git://git.citadel.org/appl/gitroot/citadel.git' -RUN sh -c 'cd /tmp/ctdl_build/citadel/libcitadel && ./bootstrap && ./configure --prefix=/usr && make && make install' -RUN sh -c 'cd /tmp/ctdl_build/citadel/citadel && ./bootstrap && ./configure && make && make install' -RUN sh -c 'cd /tmp/ctdl_build/citadel/webcit && ./bootstrap && ./configure && make && make install' -RUN sh -c 'cd /tmp/ctdl_build/citadel/textclient && ./bootstrap && ./configure --prefix=/usr && make && make install' -RUN sh -c 'cd /tmp && rm -vfr /tmp/ctdl_build' -RUN sh -c 'rm -vrf /usr/local/citadel/data /usr/local/citadel/files /usr/local/citadel/keys /usr/local/webcit/keys' +# Deploy "ctdlvisor", a small supervisor program which runs inside the container to wrangle the various services +ADD ctdlvisor.c /tmp -# ctdlvisor is a supervisor process that handles all of the components -ADD ctdlvisor.c /tmp/ctdl_build -RUN sh -c 'cd /tmp/ctdl_build && cc ctdlvisor.c -o /usr/local/bin/ctdlvisor' +# Download and build Citadel +RUN sh -c 'mkdir /tmp/ctdl_build && \ + cd /tmp/ctdl_build && \ + git clone git://git.citadel.org/appl/gitroot/citadel.git && \ + cd /tmp/ctdl_build/citadel/libcitadel && \ + ./bootstrap && \ + ./configure --prefix=/usr && \ + make && \ + make install && \ + cd /tmp/ctdl_build/citadel/citadel && \ + ./bootstrap && \ + ./configure && \ + make && \ + make install && \ + cd /tmp/ctdl_build/citadel/webcit && \ + ./bootstrap && \ + ./configure && \ + make && \ + make install && \ + cd /tmp/ctdl_build/citadel/textclient && \ + ./bootstrap && \ + ./configure --prefix=/usr --ctdldir=/citadel_data && \ + make && make install && \ + cd /tmp && \ + cc ctdlvisor.c -o /usr/local/bin/ctdlvisor && \ + rm -vf /tmp/ctdlvisor.c && \ + cd /tmp && \ + rm -vfr /tmp/ctdl_build && \ + rm -vrf /usr/local/citadel/data /usr/local/citadel/files /usr/local/citadel/keys /usr/local/webcit/keys' # Ports EXPOSE 25 80 110 119 143 443 465 504 563 587 993 995 2020 5222 -# We don't need the workdir anymore -RUN rm -fr /tmp/ctdl_build - # Let's go! ENTRYPOINT ["/usr/local/bin/ctdlvisor"]