From 22cb2659e9204b65d7449af4c84ddcf9162c5cc4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?louiz=E2=80=99?= Date: Tue, 25 Jul 2017 21:51:17 +0200 Subject: Move the Dockerfile inside an alpine subdirectory --- docker/biboumi/Dockerfile | 41 ----------------------------------- docker/biboumi/alpine/Dockerfile | 46 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 46 insertions(+), 41 deletions(-) delete mode 100644 docker/biboumi/Dockerfile create mode 100644 docker/biboumi/alpine/Dockerfile (limited to 'docker') diff --git a/docker/biboumi/Dockerfile b/docker/biboumi/Dockerfile deleted file mode 100644 index 67f0f41..0000000 --- a/docker/biboumi/Dockerfile +++ /dev/null @@ -1,41 +0,0 @@ -# This Dockerfile creates a docker image running biboumi - -FROM docker.io/alpine:latest - -RUN apk add --no-cache\ - g++\ - cmake\ - make\ - udns-dev\ - sqlite-dev\ - libuuid\ - util-linux-dev\ - expat-dev\ - libidn-dev\ - git\ - python2 - -# Install botan -RUN git clone https://github.com/randombit/botan.git && cd botan && ./configure.py --prefix=/usr && make -j8 && make install && rm -rf /botan - -# Install biboumi -RUN git clone git://git.louiz.org/biboumi && mkdir ./biboumi/build && cd ./biboumi/build &&\ - cmake .. -DCMAKE_INSTALL_PREFIX=/usr\ - -DCMAKE_BUILD_TYPE=Release\ - -DWITH_BOTAN=1\ - -DWITH_SQLITE3=1\ - -DWITH_LIBIDN=1\ - && make -j8 && make install && rm -rf /biboumi - -RUN adduser biboumi -D -h /home/biboumi - -RUN mkdir /var/lib/biboumi -RUN chown -R biboumi:biboumi /var/lib/biboumi - -COPY ./biboumi.cfg /etc/biboumi/biboumi.cfg -RUN chown -R biboumi:biboumi /etc/biboumi - -WORKDIR /home/biboumi -USER biboumi - -CMD ["/usr/bin/biboumi", "/etc/biboumi/biboumi.cfg"] diff --git a/docker/biboumi/alpine/Dockerfile b/docker/biboumi/alpine/Dockerfile new file mode 100644 index 0000000..da60796 --- /dev/null +++ b/docker/biboumi/alpine/Dockerfile @@ -0,0 +1,46 @@ +# This Dockerfile creates a docker image running biboumi +# +# It is built by compiling the sources and all its dependencies +# directly inside the image. +# This is the prefered way to build the release image, used by the +# end users, in production. + +FROM docker.io/alpine:latest + +RUN apk add --no-cache\ + g++\ + cmake\ + make\ + udns-dev\ + sqlite-dev\ + libuuid\ + util-linux-dev\ + expat-dev\ + libidn-dev\ + git\ + python2 + +# Install botan +RUN git clone https://github.com/randombit/botan.git && cd botan && ./configure.py --prefix=/usr && make -j8 && make install && rm -rf /botan + +# Install biboumi +RUN git clone git://git.louiz.org/biboumi && mkdir ./biboumi/build && cd ./biboumi/build &&\ + cmake .. -DCMAKE_INSTALL_PREFIX=/usr\ + -DCMAKE_BUILD_TYPE=Release\ + -DWITH_BOTAN=1\ + -DWITH_SQLITE3=1\ + -DWITH_LIBIDN=1\ + && make -j8 && make install && rm -rf /biboumi + +RUN adduser biboumi -D -h /home/biboumi + +RUN mkdir /var/lib/biboumi +RUN chown -R biboumi:biboumi /var/lib/biboumi + +COPY ../biboumi.cfg /etc/biboumi/biboumi.cfg +RUN chown -R biboumi:biboumi /etc/biboumi + +WORKDIR /home/biboumi +USER biboumi + +CMD ["/usr/bin/biboumi", "/etc/biboumi/biboumi.cfg"] -- cgit v1.2.3