summaryrefslogtreecommitdiff
path: root/docker
diff options
context:
space:
mode:
Diffstat (limited to 'docker')
-rw-r--r--docker/biboumi-test/alpine/Dockerfile54
-rw-r--r--docker/biboumi-test/debian/Dockerfile62
-rw-r--r--docker/biboumi-test/fedora/Dockerfile64
-rw-r--r--docker/biboumi/alpine/Dockerfile72
-rw-r--r--docker/test/alpine/Dockerfile35
-rw-r--r--docker/test/debian/Dockerfile38
-rw-r--r--docker/test/fedora/Dockerfile40
7 files changed, 153 insertions, 212 deletions
diff --git a/docker/biboumi-test/alpine/Dockerfile b/docker/biboumi-test/alpine/Dockerfile
deleted file mode 100644
index e43f1b6..0000000
--- a/docker/biboumi-test/alpine/Dockerfile
+++ /dev/null
@@ -1,54 +0,0 @@
-# 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/alpine:latest
-
-ENV LC_ALL C.UTF-8
-
-# Needed to build biboumi
-RUN apk add --no-cache g++\
- clang\
- valgrind\
- udns-dev\
- sqlite-dev\
- libuuid\
- util-linux-dev\
- libgcrypt-dev\
- cmake\
- make\
- expat-dev\
- libidn-dev\
- git\
- py3-lxml\
- libtool\
- py3-pip\
- python2\
- python3-dev\
- automake\
- autoconf\
- flex\
- bison\
- libltdl\
- openssl\
- libressl-dev\
- zlib-dev\
- curl\
- postgresql-dev
-
-# 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 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 && cd slixmpp && python3 setup.py build && python3 setup.py install
-
-RUN adduser tester -D -h /home/tester
-
-# Install charybdis, for e2e tests
-RUN git clone https://github.com/charybdis-ircd/charybdis.git && cd charybdis && cd /charybdis && git checkout 4f2b9a4 && sed s/113/1113/ -i /charybdis/authd/providers/ident.c && ./autogen.sh && ./configure --prefix=/home/tester/ircd --bindir=/usr/bin && make -j8 && make install && rm -rf /charybdis
-
-RUN chown -R tester:tester /home/tester/ircd
-
-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
deleted file mode 100644
index 557face..0000000
--- a/docker/biboumi-test/debian/Dockerfile
+++ /dev/null
@@ -1,62 +0,0 @@
-# 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
-
-ENV LC_ALL C.UTF-8
-
-RUN apt update
-
-# Needed to build biboumi
-RUN apt install -y g++\
- clang\
- valgrind\
- libudns-dev\
- libc-ares-dev\
- libsqlite3-dev\
- libuuid1\
- libgcrypt20-dev\
- cmake\
- make\
- libexpat1-dev\
- libidn11-dev\
- uuid-dev\
- libsystemd-dev\
- pandoc\
- libasan3\
- libubsan0\
- git\
- python3-lxml\
- lcov\
- libtool\
- python3-pip\
- python3-dev\
- automake\
- autoconf\
- flex\
- bison\
- libltdl-dev\
- openssl\
- zlib1g-dev\
- libssl-dev\
- curl\
- libpq-dev
-
-# 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 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 useradd tester -m
-
-# Install charybdis, for e2e tests
-RUN git clone https://github.com/charybdis-ircd/charybdis.git && cd charybdis && cd /charybdis && git checkout 4f2b9a4 && sed s/113/1113/ -i /charybdis/authd/providers/ident.c && ./autogen.sh && ./configure --prefix=/home/tester/ircd --bindir=/usr/bin && make -j8 && make install && rm -rf /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
diff --git a/docker/biboumi-test/fedora/Dockerfile b/docker/biboumi-test/fedora/Dockerfile
deleted file mode 100644
index 12e13e5..0000000
--- a/docker/biboumi-test/fedora/Dockerfile
+++ /dev/null
@@ -1,64 +0,0 @@
-# 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/fedora:latest
-
-ENV LC_ALL C.UTF-8
-
-RUN dnf --refresh install -y\
- gcc-c++\
- clang\
- valgrind\
- udns-devel\
- c-ares-devel\
- sqlite-devel\
- libuuid-devel\
- libgcrypt-devel\
- cmake\
- make\
- expat-devel\
- libidn-devel\
- uuid-devel\
- systemd-devel\
- pandoc\
- libasan\
- libubsan\
- git\
- fedora-packager\
- python3-lxml\
- lcov\
- rpmdevtools\
- python3-devel\
- automake\
- autoconf\
- flex\
- flex-devel\
- bison\
- libtool-ltdl-devel\
- libtool\
- openssl-devel\
- which\
- java-1.8.0-openjdk\
- postgresql-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
-
-RUN useradd tester
-
-# Install charybdis, for e2e tests
-RUN git clone https://github.com/charybdis-ircd/charybdis.git && cd charybdis && cd /charybdis && git checkout 4f2b9a4 && sed s/113/1113/ -i /charybdis/authd/providers/ident.c && ./autogen.sh && ./configure --prefix=/home/tester/ircd --bindir=/usr/bin --with-included-boost && make -j8 && make install && rm -rf /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
-
-COPY coverity /home/tester/coverity
-
-WORKDIR /home/tester
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"]
+
diff --git a/docker/test/alpine/Dockerfile b/docker/test/alpine/Dockerfile
new file mode 100644
index 0000000..8ba7ddf
--- /dev/null
+++ b/docker/test/alpine/Dockerfile
@@ -0,0 +1,35 @@
+# 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/alpine:latest
+
+ENV LC_ALL C.UTF-8
+
+# Needed to build biboumi
+RUN apk add --no-cache \
+git \
+make \
+cmake \
+g++ \
+libuuid \
+udns-dev \
+expat-dev \
+libidn-dev \
+sqlite-dev \
+botan-dev \
+util-linux-dev \
+libgcrypt-dev \
+postgresql-dev \
+valgrind \
+py3-pip \
+py3-lxml \
+python3-dev \
+libffi-dev \
+go \
+wget
+
+# Install oragono, for e2e tests
+RUN wget "https://github.com/oragono/oragono/archive/v2.0.0.tar.gz" && tar xvf "v2.0.0.tar.gz" && cd "oragono-2.0.0" && make && cp ~/go/bin/oragono /usr/local/bin
+
+# 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 && cd slixmpp && python3 setup.py build && python3 setup.py install
diff --git a/docker/test/debian/Dockerfile b/docker/test/debian/Dockerfile
new file mode 100644
index 0000000..35578b9
--- /dev/null
+++ b/docker/test/debian/Dockerfile
@@ -0,0 +1,38 @@
+# 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:buster
+
+ENV LC_ALL C.UTF-8
+
+RUN apt update
+
+# Needed to build biboumi
+RUN apt install -y --no-install-recommends \
+git \
+make \
+cmake \
+g++ \
+libuuid1 \
+libudns-dev \
+libexpat1-dev \
+libidn11-dev \
+libsqlite3-dev \
+libbotan-2-dev \
+libsystemd-dev \
+uuid-dev \
+libgcrypt20-dev \
+libpq-dev \
+valgrind \
+libasan5 \
+libubsan0 \
+python3-pip \
+python3-lxml \
+python3-dev \
+wget
+
+RUN wget "https://github.com/oragono/oragono/releases/download/v2.0.0/oragono-2.0.0-linux-x64.tar.gz" && tar xvf oragono-2.0.0-linux-x64.tar.gz && cp oragono-2.0.0-linux-x64/oragono /usr/local/bin
+
+# 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 && cd slixmpp && python3 setup.py build && python3 setup.py install
+
diff --git a/docker/test/fedora/Dockerfile b/docker/test/fedora/Dockerfile
new file mode 100644
index 0000000..7b8d7bf
--- /dev/null
+++ b/docker/test/fedora/Dockerfile
@@ -0,0 +1,40 @@
+# 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/fedora:32
+
+ENV LC_ALL C.UTF-8
+
+RUN dnf --refresh install -y \
+git \
+make \
+cmake \
+gcc-c++ \
+uuid-devel \
+udns-devel \
+expat-devel \
+libidn-devel \
+sqlite-devel \
+botan2-devel \
+systemd-devel \
+libuuid-devel \
+libgcrypt-devel \
+postgresql-devel \
+lcov \
+libasan \
+libubsan \
+valgrind \
+python3-pip \
+python3-lxml \
+python3-devel \
+python3-sphinx \
+wget \
+fedora-packager \
+rpmdevtools \
+&& dnf clean all
+
+# 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
+
+# Install oragono, for e2e tests
+RUN wget "https://github.com/oragono/oragono/releases/download/v2.0.0/oragono-2.0.0-linux-x64.tar.gz" && tar xvf oragono-2.0.0-linux-x64.tar.gz && cp oragono-2.0.0-linux-x64/oragono /usr/local/bin