Files
biboumi/docker/biboumi/Dockerfile
T
louiz’ 3666f35e0e Use alpine for the docker image, and simplify the config + run stuff
Using env variable directly used by the process, it’s easier than calling
sed on the configuration file before we start the process.  Also we don’t
need to start as root anymore, and it’s a lot cleaner.
2017-04-21 11:49:23 +02:00

45 lines
1.2 KiB
Docker

# 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 litesql
RUN git clone git://git.louiz.org/litesql && mkdir /litesql/build && cd /litesql/build && cmake .. -DCMAKE_INSTALL_PREFIX=/usr && make -j8 && cd /litesql/build && make install && rm -rf /litesql
# 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_LITESQL=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"]