diff options
Diffstat (limited to 'docker')
-rw-r--r-- | docker/biboumi-test/alpine/Dockerfile | 4 | ||||
-rw-r--r-- | docker/biboumi-test/debian/Dockerfile | 8 | ||||
-rw-r--r-- | docker/biboumi-test/fedora/Dockerfile | 6 | ||||
-rw-r--r-- | docker/biboumi/alpine/Dockerfile | 72 |
4 files changed, 49 insertions, 41 deletions
diff --git a/docker/biboumi-test/alpine/Dockerfile b/docker/biboumi-test/alpine/Dockerfile index e43f1b6..9d59c32 100644 --- a/docker/biboumi-test/alpine/Dockerfile +++ b/docker/biboumi-test/alpine/Dockerfile @@ -26,6 +26,7 @@ RUN apk add --no-cache g++\ python3-dev\ automake\ autoconf\ + libffi-dev\ flex\ bison\ libltdl\ @@ -48,7 +49,8 @@ RUN git clone https://github.com/charybdis-ircd/charybdis.git && cd charybdis && RUN chown -R tester:tester /home/tester/ircd +USER tester RUN yes "" | openssl req -nodes -x509 -newkey rsa:4096 -keyout /home/tester/ircd/etc/ssl.key -out /home/tester/ircd/etc/ssl.pem WORKDIR /home/tester -USER tester + diff --git a/docker/biboumi-test/debian/Dockerfile b/docker/biboumi-test/debian/Dockerfile index 557face..1c6437c 100644 --- a/docker/biboumi-test/debian/Dockerfile +++ b/docker/biboumi-test/debian/Dockerfile @@ -1,7 +1,7 @@ # This Dockerfile creates a docker image suitable to run biboumi’s build and # tests. For example, it can be used on with gitlab-ci. -FROM docker.io/debian:latest +FROM docker.io/debian:buster ENV LC_ALL C.UTF-8 @@ -22,8 +22,8 @@ RUN apt install -y g++\ libidn11-dev\ uuid-dev\ libsystemd-dev\ - pandoc\ - libasan3\ + python3-sphinx\ + libasan5\ libubsan0\ git\ python3-lxml\ @@ -46,7 +46,7 @@ RUN apt install -y g++\ RUN git clone https://github.com/randombit/botan.git && cd botan && ./configure.py --prefix=/usr && make -j8 && make install && rm -rf /botan # Install slixmpp, for e2e tests -RUN git clone https://github.com/saghul/aiodns.git && cd aiodns && git checkout 7ee13f9bea25784322~ && python3 setup.py build && python3 setup.py install && git clone git://git.louiz.org/slixmpp && pip3 install pyasn1==0.4.2 && cd slixmpp && python3 setup.py build && python3 setup.py install +RUN git clone https://github.com/saghul/aiodns.git && cd aiodns && git checkout 7ee13f9bea25784322~ && python3 setup.py build && python3 setup.py install && git clone git://git.louiz.org/slixmpp && pip3 install pyasn1 && cd slixmpp && python3 setup.py build && python3 setup.py install RUN useradd tester -m diff --git a/docker/biboumi-test/fedora/Dockerfile b/docker/biboumi-test/fedora/Dockerfile index 12e13e5..61fa3be 100644 --- a/docker/biboumi-test/fedora/Dockerfile +++ b/docker/biboumi-test/fedora/Dockerfile @@ -20,7 +20,7 @@ RUN dnf --refresh install -y\ libidn-devel\ uuid-devel\ systemd-devel\ - pandoc\ + python3-sphinx\ libasan\ libubsan\ git\ @@ -40,11 +40,9 @@ RUN dnf --refresh install -y\ which\ java-1.8.0-openjdk\ postgresql-devel\ + botan2-devel\ && dnf clean all -# Install botan -RUN git clone https://github.com/randombit/botan.git && cd botan && ./configure.py --prefix=/usr && make -j8 && make install && ldconfig && rm -rf /botan - # Install slixmpp, for e2e tests RUN git clone git://git.louiz.org/slixmpp && pip3 install pyasn1 && cd slixmpp && python3 setup.py build && python3 setup.py install diff --git a/docker/biboumi/alpine/Dockerfile b/docker/biboumi/alpine/Dockerfile index 0b59eb7..89c7223 100644 --- a/docker/biboumi/alpine/Dockerfile +++ b/docker/biboumi/alpine/Dockerfile @@ -5,44 +5,52 @@ # This is the prefered way to build the release image, used by the # end users, in production. +FROM docker.io/alpine:latest as builder + +RUN apk add --no-cache --virtual .build cmake expat-dev g++ git libidn-dev \ + make postgresql-dev python2 sqlite-dev udns-dev util-linux-dev + +RUN git clone https://github.com/randombit/botan.git && \ + cd botan && \ + ./configure.py --prefix=/usr && \ + make -j8 && \ + make install + +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 \ + -DWITH_POSTGRESQL=1 && \ + make -j8 && \ + make install + +# --- + FROM docker.io/alpine:latest -RUN apk add --no-cache\ - g++\ - cmake\ - make\ - udns-dev\ - sqlite-dev\ - postgresql-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\ - -DWITH_POSTGRESQL=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 +RUN apk add --no-cache libidn libpq libstdc++ libuuid postgresql-libs \ + sqlite-libs udns expat ca-certificates + +COPY --from=builder /usr/bin/botan /usr/bin/botan +COPY --from=builder /usr/lib/libbotan* /usr/lib/ +COPY --from=builder /usr/lib/pkgconfig/botan-2.pc /usr/lib/pkgconfig/botan-2.pc + +COPY --from=builder /etc/biboumi /etc/biboumi +COPY --from=builder /usr/bin/biboumi /usr/bin/biboumi COPY ./biboumi.cfg /etc/biboumi/biboumi.cfg -RUN chown -R biboumi:biboumi /etc/biboumi + +RUN adduser biboumi -D -h /home/biboumi && \ + mkdir /var/lib/biboumi && \ + chown -R biboumi:biboumi /var/lib/biboumi && \ + chown -R biboumi:biboumi /etc/biboumi WORKDIR /home/biboumi USER biboumi CMD ["/usr/bin/biboumi", "/etc/biboumi/biboumi.cfg"] + |