From b65ff9edb845b6c756a96fc3013fdf2708497a3a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?louiz=E2=80=99?= Date: Sun, 4 Dec 2016 22:56:40 +0100 Subject: =?UTF-8?q?In=20the=20docker=20images,=20use=20port=201113=20for?= =?UTF-8?q?=20charybdis=E2=80=99=20identd=20connection?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docker/biboumi-test/debian/Dockerfile | 2 +- docker/biboumi-test/fedora/Dockerfile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'docker') diff --git a/docker/biboumi-test/debian/Dockerfile b/docker/biboumi-test/debian/Dockerfile index 9aac3ec..e951b33 100644 --- a/docker/biboumi-test/debian/Dockerfile +++ b/docker/biboumi-test/debian/Dockerfile @@ -53,7 +53,7 @@ RUN useradd tester -m RUN apt install -y automake autoconf flex bison libltdl-dev openssl zlib1g-dev RUN apt install -y libtool RUN git clone https://github.com/charybdis-ircd/charybdis.git && cd charybdis -RUN cd /charybdis && git checkout 4f2b9a4 && ./autogen.sh && ./configure --prefix=/home/tester/ircd --bindir=/usr/bin && make -j8 && make install +RUN 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 RUN chown -R tester:tester /home/tester/ircd RUN rm -rf /charybdis diff --git a/docker/biboumi-test/fedora/Dockerfile b/docker/biboumi-test/fedora/Dockerfile index ebcb4e4..125c4f2 100644 --- a/docker/biboumi-test/fedora/Dockerfile +++ b/docker/biboumi-test/fedora/Dockerfile @@ -53,7 +53,7 @@ RUN useradd tester RUN dnf install -y automake autoconf flex flex-devel bison libtool-ltdl-devel openssl-devel RUN dnf install -y libtool RUN git clone https://github.com/charybdis-ircd/charybdis.git && cd charybdis -RUN cd /charybdis && git checkout 4f2b9a4 && ./autogen.sh && ./configure --prefix=/home/tester/ircd --bindir=/usr/bin --with-included-boost && make -j8 && make install +RUN 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 RUN chown -R tester:tester /home/tester/ircd RUN rm -rf /charybdis -- cgit v1.2.3 From 6fee8394f021fe5aee459ecbf678cd3a0a42ea32 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?louiz=E2=80=99?= Date: Thu, 8 Dec 2016 09:39:43 +0100 Subject: Fix the locales in the docker test images --- docker/biboumi-test/debian/Dockerfile | 11 ----------- docker/biboumi-test/fedora/Dockerfile | 2 ++ 2 files changed, 2 insertions(+), 11 deletions(-) (limited to 'docker') diff --git a/docker/biboumi-test/debian/Dockerfile b/docker/biboumi-test/debian/Dockerfile index e951b33..436cf9a 100644 --- a/docker/biboumi-test/debian/Dockerfile +++ b/docker/biboumi-test/debian/Dockerfile @@ -57,17 +57,6 @@ RUN cd /charybdis && git checkout 4f2b9a4 && sed s/113/1113/ -i /charybdis/authd RUN chown -R tester:tester /home/tester/ircd RUN rm -rf /charybdis -RUN apt install -y locales -RUN export LANGUAGE=en_US.UTF-8 -RUN export LANG=en_US.UTF-8 -RUN export LC_ALL=en_US.UTF-8 -RUN locale-gen -RUN dpkg-reconfigure locales - -RUN dpkg-reconfigure locales && \ - locale-gen C.UTF-8 && \ - /usr/sbin/update-locale LANG=C.UTF-8 - ENV LC_ALL C.UTF-8 WORKDIR /home/tester diff --git a/docker/biboumi-test/fedora/Dockerfile b/docker/biboumi-test/fedora/Dockerfile index 125c4f2..e61cfe1 100644 --- a/docker/biboumi-test/fedora/Dockerfile +++ b/docker/biboumi-test/fedora/Dockerfile @@ -64,6 +64,8 @@ COPY sonar-scanner-2.8 /home/tester/sonar-scanner RUN dnf install -y which java-1.8.0-openjdk +ENV LC_ALL C.UTF-8 + WORKDIR /home/tester USER tester -- cgit v1.2.3 From 16feed7e9e3c215625a62d444d7fa62c2a707c28 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?louiz=E2=80=99?= Date: Sat, 24 Dec 2016 15:31:53 +0100 Subject: Update the DockerFiles to include openssl --- docker/biboumi-test/debian/Dockerfile | 6 +++++- docker/biboumi-test/fedora/Dockerfile | 5 ++--- 2 files changed, 7 insertions(+), 4 deletions(-) (limited to 'docker') diff --git a/docker/biboumi-test/debian/Dockerfile b/docker/biboumi-test/debian/Dockerfile index 436cf9a..c6fc586 100644 --- a/docker/biboumi-test/debian/Dockerfile +++ b/docker/biboumi-test/debian/Dockerfile @@ -50,13 +50,17 @@ RUN cd slixmpp && python3 setup.py build && python3 setup.py install RUN useradd tester -m # Install charybdis, for e2e tests -RUN apt install -y automake autoconf flex bison libltdl-dev openssl zlib1g-dev +RUN apt install -y automake autoconf flex bison libltdl-dev openssl zlib1g-dev libssl-dev RUN apt install -y libtool RUN git clone https://github.com/charybdis-ircd/charybdis.git && cd charybdis RUN 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 RUN chown -R tester:tester /home/tester/ircd RUN rm -rf /charybdis +RUN yes "" | openssl req -nodes -x509 -newkey rsa:4096 -keyout /home/tester/ircd/etc/ssl.key -out /home/tester/ircd/etc/ssl.pem + +RUN apt install -y curl + ENV LC_ALL C.UTF-8 WORKDIR /home/tester diff --git a/docker/biboumi-test/fedora/Dockerfile b/docker/biboumi-test/fedora/Dockerfile index e61cfe1..14e752f 100644 --- a/docker/biboumi-test/fedora/Dockerfile +++ b/docker/biboumi-test/fedora/Dockerfile @@ -57,15 +57,14 @@ RUN cd /charybdis && git checkout 4f2b9a4 && sed s/113/1113/ -i /charybdis/authd RUN chown -R tester:tester /home/tester/ircd RUN rm -rf /charybdis -RUN su - tester -c "echo export LANG=en_GB.utf-8 >> /home/tester/.bashrc" - COPY coverity /home/tester/coverity COPY sonar-scanner-2.8 /home/tester/sonar-scanner RUN dnf install -y which java-1.8.0-openjdk +RUN yes "" | openssl req -nodes -x509 -newkey rsa:4096 -keyout /home/tester/ircd/etc/ssl.key -out /home/tester/ircd/etc/ssl.pem + ENV LC_ALL C.UTF-8 WORKDIR /home/tester USER tester - -- cgit v1.2.3 From eecb95352e4d903dd72501fd69a5676928ee8aae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?louiz=E2=80=99?= Date: Wed, 4 Jan 2017 01:53:53 +0100 Subject: Add libasan and libubsan in the test docker images --- docker/biboumi-test/debian/Dockerfile | 2 ++ docker/biboumi-test/fedora/Dockerfile | 2 ++ 2 files changed, 4 insertions(+) (limited to 'docker') diff --git a/docker/biboumi-test/debian/Dockerfile b/docker/biboumi-test/debian/Dockerfile index c6fc586..406dc44 100644 --- a/docker/biboumi-test/debian/Dockerfile +++ b/docker/biboumi-test/debian/Dockerfile @@ -19,6 +19,8 @@ RUN apt install -y libidn11-dev RUN apt install -y uuid-dev RUN apt install -y libsystemd-dev RUN apt install -y pandoc +RUN apt install -y libasan2 +RUN apt install -y libubsan0 # Needed to run tests RUN apt install -y git diff --git a/docker/biboumi-test/fedora/Dockerfile b/docker/biboumi-test/fedora/Dockerfile index 14e752f..4d82c7d 100644 --- a/docker/biboumi-test/fedora/Dockerfile +++ b/docker/biboumi-test/fedora/Dockerfile @@ -19,6 +19,8 @@ RUN dnf install -y libidn-devel RUN dnf install -y uuid-devel RUN dnf install -y systemd-devel RUN dnf install -y pandoc +RUN dnf install -y libasan +RUN dnf install -y libubsan # Needed to run tests RUN dnf install -y git -- cgit v1.2.3 From 5b56007828f20c763df3f36ceed809188880663e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?louiz=E2=80=99?= Date: Fri, 6 Jan 2017 22:58:18 +0100 Subject: Use udns instead of c-ares fix #3226 --- docker/biboumi-test/debian/Dockerfile | 2 +- docker/biboumi-test/fedora/Dockerfile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'docker') diff --git a/docker/biboumi-test/debian/Dockerfile b/docker/biboumi-test/debian/Dockerfile index 406dc44..ee30e14 100644 --- a/docker/biboumi-test/debian/Dockerfile +++ b/docker/biboumi-test/debian/Dockerfile @@ -9,7 +9,7 @@ RUN apt update RUN apt install -y g++ RUN apt install -y clang RUN apt install -y valgrind -RUN apt install -y libc-ares-dev +RUN apt install -y libudns-dev RUN apt install -y libsqlite3-dev RUN apt install -y libuuid1 RUN apt install -y cmake diff --git a/docker/biboumi-test/fedora/Dockerfile b/docker/biboumi-test/fedora/Dockerfile index 4d82c7d..e0d206b 100644 --- a/docker/biboumi-test/fedora/Dockerfile +++ b/docker/biboumi-test/fedora/Dockerfile @@ -9,7 +9,7 @@ RUN dnf update -y RUN dnf install -y gcc-c++ RUN dnf install -y clang RUN dnf install -y valgrind -RUN dnf install -y c-ares-devel +RUN dnf install -y udns-devel RUN dnf install -y sqlite-devel RUN dnf install -y libuuid-devel RUN dnf install -y cmake -- cgit v1.2.3 From 3699463e2ad70c88d8b5a2b56baa4186f1fce02e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?louiz=E2=80=99?= Date: Tue, 17 Jan 2017 23:42:02 +0100 Subject: Refactor and split the Dockerfiles, to build a base without litesql --- docker/biboumi-test/debian/Dockerfile | 63 +--------------------------- docker/biboumi-test/debian/Dockerfile.base | 55 +++++++++++++++++++++++++ docker/biboumi-test/fedora/Dockerfile | 66 +----------------------------- docker/biboumi-test/fedora/Dockerfile.base | 58 ++++++++++++++++++++++++++ 4 files changed, 117 insertions(+), 125 deletions(-) create mode 100644 docker/biboumi-test/debian/Dockerfile.base create mode 100644 docker/biboumi-test/fedora/Dockerfile.base (limited to 'docker') diff --git a/docker/biboumi-test/debian/Dockerfile b/docker/biboumi-test/debian/Dockerfile index ee30e14..b811ea4 100644 --- a/docker/biboumi-test/debian/Dockerfile +++ b/docker/biboumi-test/debian/Dockerfile @@ -1,69 +1,10 @@ # 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 - -RUN apt update - -# Needed to build biboumi -RUN apt install -y g++ -RUN apt install -y clang -RUN apt install -y valgrind -RUN apt install -y libudns-dev -RUN apt install -y libsqlite3-dev -RUN apt install -y libuuid1 -RUN apt install -y cmake -RUN apt install -y make -RUN apt install -y libexpat1-dev -RUN apt install -y libidn11-dev -RUN apt install -y uuid-dev -RUN apt install -y libsystemd-dev -RUN apt install -y pandoc -RUN apt install -y libasan2 -RUN apt install -y libubsan0 - -# Needed to run tests -RUN apt install -y git -RUN apt install -y python3-lxml -RUN apt install -y lcov - -# Install botan -RUN git clone https://github.com/randombit/botan.git -RUN cd botan && ./configure.py --prefix=/usr && make -j8 && make install -RUN rm -rf /botan +FROM docker.louiz.org/biboumi-test-debian-base # Install litesql -RUN git clone git://git.louiz.org/litesql -RUN mkdir /litesql/build && cd /litesql/build && cmake .. -DCMAKE_INSTALL_PREFIX=/usr && make -j8 -RUN cd /litesql/build && make install -RUN rm -rf /litesql - -RUN ldconfig - -# Install slixmpp, for e2e tests -RUN git clone https://github.com/saghul/aiodns.git -RUN cd aiodns && python3 setup.py build && python3 setup.py install -RUN apt install -y python3-pip -RUN git clone git://git.louiz.org/slixmpp -RUN pip3 install pyasn1 -RUN apt install -y python3-dev -RUN cd slixmpp && python3 setup.py build && python3 setup.py install - -RUN useradd tester -m - -# Install charybdis, for e2e tests -RUN apt install -y automake autoconf flex bison libltdl-dev openssl zlib1g-dev libssl-dev -RUN apt install -y libtool -RUN git clone https://github.com/charybdis-ircd/charybdis.git && cd charybdis -RUN 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 -RUN chown -R tester:tester /home/tester/ircd -RUN rm -rf /charybdis - -RUN yes "" | openssl req -nodes -x509 -newkey rsa:4096 -keyout /home/tester/ircd/etc/ssl.key -out /home/tester/ircd/etc/ssl.pem - -RUN apt install -y curl - -ENV LC_ALL C.UTF-8 +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 && ldconfig WORKDIR /home/tester USER tester diff --git a/docker/biboumi-test/debian/Dockerfile.base b/docker/biboumi-test/debian/Dockerfile.base new file mode 100644 index 0000000..125c048 --- /dev/null +++ b/docker/biboumi-test/debian/Dockerfile.base @@ -0,0 +1,55 @@ +# 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\ + libsqlite3-dev\ + libuuid1\ + cmake\ + make\ + libexpat1-dev\ + libidn11-dev\ + uuid-dev\ + libsystemd-dev\ + pandoc\ + libasan1\ + libubsan0\ + git\ + python3-lxml\ + lcov\ + libtool\ + python3-pip\ + python3-dev\ + automake\ + autoconf\ + flex\ + bison\ + libltdl-dev\ + openssl\ + zlib1g-dev\ + libssl-dev\ + curl + +# 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 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 + +RUN yes "" | openssl req -nodes -x509 -newkey rsa:4096 -keyout /home/tester/ircd/etc/ssl.key -out /home/tester/ircd/etc/ssl.pem diff --git a/docker/biboumi-test/fedora/Dockerfile b/docker/biboumi-test/fedora/Dockerfile index e0d206b..45dbe76 100644 --- a/docker/biboumi-test/fedora/Dockerfile +++ b/docker/biboumi-test/fedora/Dockerfile @@ -1,72 +1,10 @@ # 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 - -RUN dnf update -y - -# Needed to build biboumi -RUN dnf install -y gcc-c++ -RUN dnf install -y clang -RUN dnf install -y valgrind -RUN dnf install -y udns-devel -RUN dnf install -y sqlite-devel -RUN dnf install -y libuuid-devel -RUN dnf install -y cmake -RUN dnf install -y make -RUN dnf install -y expat-devel -RUN dnf install -y libidn-devel -RUN dnf install -y uuid-devel -RUN dnf install -y systemd-devel -RUN dnf install -y pandoc -RUN dnf install -y libasan -RUN dnf install -y libubsan - -# Needed to run tests -RUN dnf install -y git -RUN dnf install -y fedora-packager python3-lxml -RUN dnf install -y lcov - -# To be able to create the RPM -RUN dnf install -y rpmdevtools - -# Install botan -RUN git clone https://github.com/randombit/botan.git -RUN cd botan && ./configure.py --prefix=/usr && make -j8 && make install -RUN rm -rf /botan +FROM docker.louiz.org/biboumi-test-fedora-base # Install litesql -RUN git clone git://git.louiz.org/litesql -RUN mkdir /litesql/build && cd /litesql/build && cmake .. -DCMAKE_INSTALL_PREFIX=/usr && make -j8 -RUN cd /litesql/build && make install -RUN rm -rf /litesql - -RUN ldconfig - -# Install slixmpp, for e2e tests -RUN git clone git://git.louiz.org/slixmpp -RUN pip3 install pyasn1 -RUN dnf install -y python3-devel -RUN cd slixmpp && python3 setup.py build && python3 setup.py install - -RUN useradd tester - -# Install charybdis, for e2e tests -RUN dnf install -y automake autoconf flex flex-devel bison libtool-ltdl-devel openssl-devel -RUN dnf install -y libtool -RUN git clone https://github.com/charybdis-ircd/charybdis.git && cd charybdis -RUN 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 -RUN chown -R tester:tester /home/tester/ircd -RUN rm -rf /charybdis - -COPY coverity /home/tester/coverity -COPY sonar-scanner-2.8 /home/tester/sonar-scanner - -RUN dnf install -y which java-1.8.0-openjdk - -RUN yes "" | openssl req -nodes -x509 -newkey rsa:4096 -keyout /home/tester/ircd/etc/ssl.key -out /home/tester/ircd/etc/ssl.pem - -ENV LC_ALL C.UTF-8 +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 && ldconfig && rm -rf /litesql WORKDIR /home/tester USER tester diff --git a/docker/biboumi-test/fedora/Dockerfile.base b/docker/biboumi-test/fedora/Dockerfile.base new file mode 100644 index 0000000..0fd3095 --- /dev/null +++ b/docker/biboumi-test/fedora/Dockerfile.base @@ -0,0 +1,58 @@ +# 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\ + sqlite-devel\ + libuuid-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\ + && 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 + +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 +COPY sonar-scanner-2.8 /home/tester/sonar-scanner -- cgit v1.2.3 From 6c35f49dd8c0a8f8add13c177660e65c64e649eb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?louiz=E2=80=99?= Date: Fri, 17 Feb 2017 18:25:49 +0100 Subject: Add a biboumi Dockerfile --- docker/biboumi/Dockerfile | 45 ++++++++++++++++++++++++++++++++++++++ docker/biboumi/README.rst | 51 ++++++++++++++++++++++++++++++++++++++++++++ docker/biboumi/biboumi.cfg | 6 ++++++ docker/biboumi/entrypoint.sh | 10 +++++++++ 4 files changed, 112 insertions(+) create mode 100644 docker/biboumi/Dockerfile create mode 100644 docker/biboumi/README.rst create mode 100644 docker/biboumi/biboumi.cfg create mode 100644 docker/biboumi/entrypoint.sh (limited to 'docker') diff --git a/docker/biboumi/Dockerfile b/docker/biboumi/Dockerfile new file mode 100644 index 0000000..95bd150 --- /dev/null +++ b/docker/biboumi/Dockerfile @@ -0,0 +1,45 @@ +# This Dockerfile creates a docker image running biboumi + +FROM docker.io/fedora:latest + +RUN dnf --refresh install -y\ + gcc-c++\ + cmake\ + make\ + udns-devel\ + sqlite-devel\ + libuuid-devel\ + expat-devel\ + libidn-devel\ + systemd-devel\ + git\ + python\ + && 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 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 && ldconfig && 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\ + -DWITH_SYSTEMD=1\ + && make -j8 && make install && rm -rf /biboumi + +RUN useradd biboumi + +COPY ./biboumi.cfg /etc/biboumi/biboumi.cfg +RUN chown -R biboumi:biboumi /etc/biboumi + +COPY ./entrypoint.sh /entrypoint.sh +RUN chmod 755 /entrypoint.sh + +ENTRYPOINT ["/entrypoint.sh"] + +USER biboumi diff --git a/docker/biboumi/README.rst b/docker/biboumi/README.rst new file mode 100644 index 0000000..b9c63ea --- /dev/null +++ b/docker/biboumi/README.rst @@ -0,0 +1,51 @@ +Biboumi Docker Image +==================== + +Running +------- + +This image does not embed any XMPP server. You need to have a running XMPP +server (as an other docker container for example) first. + +Assuming you have a running `prosody +`_ container already running and +`properly configured +`_ you can +use the following command to start your biboumi container. + +``` +docker run --link prosody:xmpp \ + -e BIBOUMI_PASSWORD=P4SSW0RD \ + -e BIBOUMI_HOSTNAME=irc.example.com \ + -e BIBOUMI_ADMIN=blabla \ + biboumi +``` + +Variables +--------- + +The configuration file inside the image is a template that is completed when +the container is started, using the following environment variables: + +* BIBOUMI_HOSTNAME: Sets the value of the *hostname* option. +* BIBOUMI_SECRET: Sets the value of the *password* option. +* BIBOUMI_ADMIN: Sets the value of the *admin* option. + +All these variables are optional, but biboumi will probably fail to start if +the hostname and secret are missing. + +You can also directly provide your own configuration file by mounting it +inside the container using the -v option: + +``` +docker run --link prosody:xmpp \ + -v $PWD/biboumi.cfg:/etc/biboumi/biboumi.cfg \ + biboumi +``` + +Linking with the XMPP server +---------------------------- + +You can use the --link option to connect to any server, but it needs to be +called *xmpp*. For example, if you are using a container named ejabberd, you +would use the option *--link ejabberd:xmpp*. diff --git a/docker/biboumi/biboumi.cfg b/docker/biboumi/biboumi.cfg new file mode 100644 index 0000000..fff6563 --- /dev/null +++ b/docker/biboumi/biboumi.cfg @@ -0,0 +1,6 @@ +xmpp_server_ip=xmpp +port=5347 +db_name=/var/lib/biboumi/biboumi.sqlite +hostname=BIBOUMI_HOSTNAME +password=BIBOUMI_PASSWORD +admin=BIBOUMI_ADMIN diff --git a/docker/biboumi/entrypoint.sh b/docker/biboumi/entrypoint.sh new file mode 100644 index 0000000..a0c0508 --- /dev/null +++ b/docker/biboumi/entrypoint.sh @@ -0,0 +1,10 @@ +#!/bin/bash + +sed -i s/BIBOUMI_HOSTNAME/${BIBOUMI_HOSTNAME:-biboumi.localhost}/ /etc/biboumi/biboumi.cfg +sed -i s/BIBOUMI_ADMIN/${BIBOUMI_ADMIN:-}/ /etc/biboumi/biboumi.cfg +sed -i s/BIBOUMI_SECRET/${BIBOUMI_SECRET:-missing_secret}/ /etc/biboumi/biboumi.cfg + +echo "Running biboumi with the following conf: " +cat /etc/biboumi/biboumi.cfg + +/usr/bin/biboumi /etc/biboumi/biboumi.cfg -- cgit v1.2.3 From f90969e1a18c148d93c82ab09ae48e4f634efbb1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?louiz=E2=80=99?= Date: Fri, 17 Feb 2017 22:57:30 +0100 Subject: docker: Properly handle and document the /var/lib/biboumi directory --- docker/biboumi/Dockerfile | 3 +++ docker/biboumi/README.rst | 8 ++++++++ 2 files changed, 11 insertions(+) (limited to 'docker') diff --git a/docker/biboumi/Dockerfile b/docker/biboumi/Dockerfile index 95bd150..721d106 100644 --- a/docker/biboumi/Dockerfile +++ b/docker/biboumi/Dockerfile @@ -34,6 +34,9 @@ RUN git clone git://git.louiz.org/biboumi && mkdir ./biboumi/build && cd ./bibou RUN useradd 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 diff --git a/docker/biboumi/README.rst b/docker/biboumi/README.rst index b9c63ea..fb4b212 100644 --- a/docker/biboumi/README.rst +++ b/docker/biboumi/README.rst @@ -15,6 +15,7 @@ use the following command to start your biboumi container. ``` docker run --link prosody:xmpp \ + -v $PWD/database:/var/lib/biboumi \ -e BIBOUMI_PASSWORD=P4SSW0RD \ -e BIBOUMI_HOSTNAME=irc.example.com \ -e BIBOUMI_ADMIN=blabla \ @@ -49,3 +50,10 @@ Linking with the XMPP server You can use the --link option to connect to any server, but it needs to be called *xmpp*. For example, if you are using a container named ejabberd, you would use the option *--link ejabberd:xmpp*. +Volumes +------- + +The database is stored in the /var/lib/biboumi/ directory. If you don’t bind +a local directory to it, the database will be lost when the container is +stopped. If you want to keep your database between each run, bind it with +the -v option, like this: **-v /srv/biboumi/:/var/lib/biboumi**. -- cgit v1.2.3 From 27d847711c5e663d2fa3b2295f5f50c898783eb1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?louiz=E2=80=99?= Date: Fri, 17 Feb 2017 14:58:23 +0100 Subject: docker: Add the XMPP_SERVER_IP option, and document the --network=host usage --- docker/biboumi/README.rst | 27 +++++++++++++++++++++++---- docker/biboumi/biboumi.cfg | 2 +- docker/biboumi/entrypoint.sh | 1 + 3 files changed, 25 insertions(+), 5 deletions(-) (limited to 'docker') diff --git a/docker/biboumi/README.rst b/docker/biboumi/README.rst index fb4b212..f6d529d 100644 --- a/docker/biboumi/README.rst +++ b/docker/biboumi/README.rst @@ -5,7 +5,7 @@ Running ------- This image does not embed any XMPP server. You need to have a running XMPP -server (as an other docker container for example) first. +server first: as an other docker image, or running on the host machine. Assuming you have a running `prosody `_ container already running and @@ -22,6 +22,19 @@ docker run --link prosody:xmpp \ biboumi ``` +If instead you already have an XMPP server running on the host machine, you +can start the biboumi container like this: + +``` +docker run --network=host \ + -v $PWD/database:/var/lib/biboumi \ + -e BIBOUMI_PASSWORD=P4SSW0RD \ + -e BIBOUMI_HOSTNAME=irc.example.com \ + -e BIBOUMI_ADMIN=blabla \ + -e BIBOUMI_XMPP_SERVER_IP=127.0.0.1 \ + biboumi +``` + Variables --------- @@ -31,6 +44,7 @@ the container is started, using the following environment variables: * BIBOUMI_HOSTNAME: Sets the value of the *hostname* option. * BIBOUMI_SECRET: Sets the value of the *password* option. * BIBOUMI_ADMIN: Sets the value of the *admin* option. +* BIBOUMI_XMPP_SERVER_IP: Sets the value of the *xmpp_server_ip* option. The default is **xmpp**. All these variables are optional, but biboumi will probably fail to start if the hostname and secret are missing. @@ -47,9 +61,14 @@ docker run --link prosody:xmpp \ Linking with the XMPP server ---------------------------- -You can use the --link option to connect to any server, but it needs to be -called *xmpp*. For example, if you are using a container named ejabberd, you -would use the option *--link ejabberd:xmpp*. +You can use the --link option to connect to any server running in a docker +container, but it needs to be called *xmpp*, or the custom value set for the +**BIBOUMI_XMPP_SERVER_IP** option. For example, if you are using a container +named ejabberd, you would use the option *--link ejabberd:xmpp*. + +If you want to connect to the XMPP server running on the host machine, use +the **--network=host** option. + Volumes ------- diff --git a/docker/biboumi/biboumi.cfg b/docker/biboumi/biboumi.cfg index fff6563..cc5df61 100644 --- a/docker/biboumi/biboumi.cfg +++ b/docker/biboumi/biboumi.cfg @@ -1,4 +1,4 @@ -xmpp_server_ip=xmpp +xmpp_server_ip=BIBOUMI_XMPP_SERVER_IP port=5347 db_name=/var/lib/biboumi/biboumi.sqlite hostname=BIBOUMI_HOSTNAME diff --git a/docker/biboumi/entrypoint.sh b/docker/biboumi/entrypoint.sh index a0c0508..4d00164 100644 --- a/docker/biboumi/entrypoint.sh +++ b/docker/biboumi/entrypoint.sh @@ -1,5 +1,6 @@ #!/bin/bash +sed -i s/BIBOUMI_XMPP_SERVER_IP/${BIBOUMI_XMPP_SERVER_IP:-xmpp}/ /etc/biboumi/biboumi.cfg sed -i s/BIBOUMI_HOSTNAME/${BIBOUMI_HOSTNAME:-biboumi.localhost}/ /etc/biboumi/biboumi.cfg sed -i s/BIBOUMI_ADMIN/${BIBOUMI_ADMIN:-}/ /etc/biboumi/biboumi.cfg sed -i s/BIBOUMI_SECRET/${BIBOUMI_SECRET:-missing_secret}/ /etc/biboumi/biboumi.cfg -- cgit v1.2.3 From 9f978cda943619c95a41e5da9047c3cc0dd31555 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?louiz=E2=80=99?= Date: Fri, 17 Feb 2017 22:59:16 +0100 Subject: docker: fix the SECRET->PASSWORD in entrypoint.sh --- docker/biboumi/entrypoint.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'docker') diff --git a/docker/biboumi/entrypoint.sh b/docker/biboumi/entrypoint.sh index 4d00164..eda53a4 100644 --- a/docker/biboumi/entrypoint.sh +++ b/docker/biboumi/entrypoint.sh @@ -3,7 +3,7 @@ sed -i s/BIBOUMI_XMPP_SERVER_IP/${BIBOUMI_XMPP_SERVER_IP:-xmpp}/ /etc/biboumi/biboumi.cfg sed -i s/BIBOUMI_HOSTNAME/${BIBOUMI_HOSTNAME:-biboumi.localhost}/ /etc/biboumi/biboumi.cfg sed -i s/BIBOUMI_ADMIN/${BIBOUMI_ADMIN:-}/ /etc/biboumi/biboumi.cfg -sed -i s/BIBOUMI_SECRET/${BIBOUMI_SECRET:-missing_secret}/ /etc/biboumi/biboumi.cfg +sed -i s/BIBOUMI_PASSWORD/${BIBOUMI_PASSWORD:-missing_password}/ /etc/biboumi/biboumi.cfg echo "Running biboumi with the following conf: " cat /etc/biboumi/biboumi.cfg -- cgit v1.2.3 From 26eb28dc2368d14e171201a0c6b76b76b19e1ddc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?louiz=E2=80=99?= Date: Tue, 28 Feb 2017 19:39:09 +0100 Subject: Split the biboumi dockerfile into two, to be able to disable the cache --- docker/biboumi/Dockerfile | 30 +++++------------------------- docker/biboumi/Dockerfile.base | 23 +++++++++++++++++++++++ docker/biboumi/README.rst | 20 ++++++++++++++++++++ docker/biboumi/build-docker.sh | 14 ++++++++++++++ 4 files changed, 62 insertions(+), 25 deletions(-) create mode 100644 docker/biboumi/Dockerfile.base create mode 100755 docker/biboumi/build-docker.sh (limited to 'docker') diff --git a/docker/biboumi/Dockerfile b/docker/biboumi/Dockerfile index 721d106..7e73c9a 100644 --- a/docker/biboumi/Dockerfile +++ b/docker/biboumi/Dockerfile @@ -1,28 +1,8 @@ -# This Dockerfile creates a docker image running biboumi - -FROM docker.io/fedora:latest - -RUN dnf --refresh install -y\ - gcc-c++\ - cmake\ - make\ - udns-devel\ - sqlite-devel\ - libuuid-devel\ - expat-devel\ - libidn-devel\ - systemd-devel\ - git\ - python\ - && 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 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 && ldconfig && rm -rf /litesql - -# Install biboumi +# This dockerfile uses the image built using Dockerfile.base, and installs +# biboumi in it + +FROM biboumi-base + RUN git clone git://git.louiz.org/biboumi && mkdir ./biboumi/build && cd ./biboumi/build &&\ cmake .. -DCMAKE_INSTALL_PREFIX=/usr\ -DCMAKE_BUILD_TYPE=Release\ diff --git a/docker/biboumi/Dockerfile.base b/docker/biboumi/Dockerfile.base new file mode 100644 index 0000000..bbc32c2 --- /dev/null +++ b/docker/biboumi/Dockerfile.base @@ -0,0 +1,23 @@ +# This dockerfile install all the dependencies needing to compile biboumi + +FROM docker.io/fedora:latest + +RUN dnf --refresh install -y\ + gcc-c++\ + cmake\ + make\ + udns-devel\ + sqlite-devel\ + libuuid-devel\ + expat-devel\ + libidn-devel\ + systemd-devel\ + git\ + python\ + && 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 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 && ldconfig && rm -rf /litesql diff --git a/docker/biboumi/README.rst b/docker/biboumi/README.rst index f6d529d..d2e2a7e 100644 --- a/docker/biboumi/README.rst +++ b/docker/biboumi/README.rst @@ -76,3 +76,23 @@ The database is stored in the /var/lib/biboumi/ directory. If you don’t bind a local directory to it, the database will be lost when the container is stopped. If you want to keep your database between each run, bind it with the -v option, like this: **-v /srv/biboumi/:/var/lib/biboumi**. + +Building +-------- + +This image is built from 2 Dockerfiles: +- Dockerfile.base: builds and installs all the dependencies needed to build and run biboumi +- Dockerfile: builds and installs biboumi itself + +The goal is to be able to force the rebuild of biboumi itself (by using +the --no-cache option) without having to rebuild and install all its +dependencies. + +The build does not require any file in the build context, everything is +fetched during the build using git or dnf. + +To build a biboumi image named “foo/biboumi”, you can run the script: + +``` +./build-docker.sh foo/biboumi +``` diff --git a/docker/biboumi/build-docker.sh b/docker/biboumi/build-docker.sh new file mode 100755 index 0000000..d206b89 --- /dev/null +++ b/docker/biboumi/build-docker.sh @@ -0,0 +1,14 @@ +#!/bin/sh + +if [[ -z "$1" ]]; then + echo "Usage: ./build-docker.sh " + echo "Example: ./build-docker.sh docker.io/coucou/biboumi" + exit 1 +fi + +directory=$(dirname $0) +image_name=$1 + +echo $directory +docker build -t biboumi-base $directory -f $directory/Dockerfile.base +docker build -t $image_name $directory -f $directory/Dockerfile --no-cache -- cgit v1.2.3 From 90b3c07b6c43215076f2f1eacbfb1335aa714366 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?louiz=E2=80=99?= Date: Tue, 28 Feb 2017 23:46:55 +0100 Subject: Revert "Split the biboumi dockerfile into two, to be able to disable the cache" This reverts commit 26eb28dc2368d14e171201a0c6b76b76b19e1ddc. --- docker/biboumi/Dockerfile | 30 +++++++++++++++++++++++++----- docker/biboumi/Dockerfile.base | 23 ----------------------- docker/biboumi/README.rst | 20 -------------------- docker/biboumi/build-docker.sh | 14 -------------- 4 files changed, 25 insertions(+), 62 deletions(-) delete mode 100644 docker/biboumi/Dockerfile.base delete mode 100755 docker/biboumi/build-docker.sh (limited to 'docker') diff --git a/docker/biboumi/Dockerfile b/docker/biboumi/Dockerfile index 7e73c9a..721d106 100644 --- a/docker/biboumi/Dockerfile +++ b/docker/biboumi/Dockerfile @@ -1,8 +1,28 @@ -# This dockerfile uses the image built using Dockerfile.base, and installs -# biboumi in it - -FROM biboumi-base - +# This Dockerfile creates a docker image running biboumi + +FROM docker.io/fedora:latest + +RUN dnf --refresh install -y\ + gcc-c++\ + cmake\ + make\ + udns-devel\ + sqlite-devel\ + libuuid-devel\ + expat-devel\ + libidn-devel\ + systemd-devel\ + git\ + python\ + && 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 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 && ldconfig && 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\ diff --git a/docker/biboumi/Dockerfile.base b/docker/biboumi/Dockerfile.base deleted file mode 100644 index bbc32c2..0000000 --- a/docker/biboumi/Dockerfile.base +++ /dev/null @@ -1,23 +0,0 @@ -# This dockerfile install all the dependencies needing to compile biboumi - -FROM docker.io/fedora:latest - -RUN dnf --refresh install -y\ - gcc-c++\ - cmake\ - make\ - udns-devel\ - sqlite-devel\ - libuuid-devel\ - expat-devel\ - libidn-devel\ - systemd-devel\ - git\ - python\ - && 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 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 && ldconfig && rm -rf /litesql diff --git a/docker/biboumi/README.rst b/docker/biboumi/README.rst index d2e2a7e..f6d529d 100644 --- a/docker/biboumi/README.rst +++ b/docker/biboumi/README.rst @@ -76,23 +76,3 @@ The database is stored in the /var/lib/biboumi/ directory. If you don’t bind a local directory to it, the database will be lost when the container is stopped. If you want to keep your database between each run, bind it with the -v option, like this: **-v /srv/biboumi/:/var/lib/biboumi**. - -Building --------- - -This image is built from 2 Dockerfiles: -- Dockerfile.base: builds and installs all the dependencies needed to build and run biboumi -- Dockerfile: builds and installs biboumi itself - -The goal is to be able to force the rebuild of biboumi itself (by using -the --no-cache option) without having to rebuild and install all its -dependencies. - -The build does not require any file in the build context, everything is -fetched during the build using git or dnf. - -To build a biboumi image named “foo/biboumi”, you can run the script: - -``` -./build-docker.sh foo/biboumi -``` diff --git a/docker/biboumi/build-docker.sh b/docker/biboumi/build-docker.sh deleted file mode 100755 index d206b89..0000000 --- a/docker/biboumi/build-docker.sh +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/sh - -if [[ -z "$1" ]]; then - echo "Usage: ./build-docker.sh " - echo "Example: ./build-docker.sh docker.io/coucou/biboumi" - exit 1 -fi - -directory=$(dirname $0) -image_name=$1 - -echo $directory -docker build -t biboumi-base $directory -f $directory/Dockerfile.base -docker build -t $image_name $directory -f $directory/Dockerfile --no-cache -- cgit v1.2.3 From ea0151165a8719e596cbd35165db28fe90a376b1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?louiz=E2=80=99?= Date: Tue, 28 Feb 2017 23:54:02 +0100 Subject: Use markdown for the docker readme --- docker/biboumi/README.md | 77 ++++++++++++++++++++++++++++++++++++++++++++++ docker/biboumi/README.rst | 78 ----------------------------------------------- 2 files changed, 77 insertions(+), 78 deletions(-) create mode 100644 docker/biboumi/README.md delete mode 100644 docker/biboumi/README.rst (limited to 'docker') diff --git a/docker/biboumi/README.md b/docker/biboumi/README.md new file mode 100644 index 0000000..094bb78 --- /dev/null +++ b/docker/biboumi/README.md @@ -0,0 +1,77 @@ +Biboumi Docker Image +==================== + +Running +------- + +This image does not embed any XMPP server. You need to have a running XMPP +server first: as an other docker image, or running on the host machine. + +Assuming you have a running [prosody](https://hub.docker.com/r/prosody/prosody/) +container already running and +[properly configured](https://prosody.im/doc/components#adding_an_external_component) +you can use the following command to start your biboumi container. + +``` +docker run --link prosody:xmpp \ + -v $PWD/database:/var/lib/biboumi \ + -e BIBOUMI_PASSWORD=P4SSW0RD \ + -e BIBOUMI_HOSTNAME=irc.example.com \ + -e BIBOUMI_ADMIN=blabla \ + biboumi +``` + +If instead you already have an XMPP server running on the host machine, you +can start the biboumi container like this: + +``` +docker run --network=host \ + -v $PWD/database:/var/lib/biboumi \ + -e BIBOUMI_PASSWORD=P4SSW0RD \ + -e BIBOUMI_HOSTNAME=irc.example.com \ + -e BIBOUMI_ADMIN=blabla \ + -e BIBOUMI_XMPP_SERVER_IP=127.0.0.1 \ + biboumi +``` + +Variables +--------- + +The configuration file inside the image is a template that is completed when +the container is started, using the following environment variables: + +* BIBOUMI_HOSTNAME: Sets the value of the *hostname* option. +* BIBOUMI_SECRET: Sets the value of the *password* option. +* BIBOUMI_ADMIN: Sets the value of the *admin* option. +* BIBOUMI_XMPP_SERVER_IP: Sets the value of the *xmpp_server_ip* option. The default is **xmpp**. + +All these variables are optional, but biboumi will probably fail to start if +the hostname and secret are missing. + +You can also directly provide your own configuration file by mounting it +inside the container using the -v option: + +``` +docker run --link prosody:xmpp \ + -v $PWD/biboumi.cfg:/etc/biboumi/biboumi.cfg \ + biboumi +``` + +Linking with the XMPP server +---------------------------- + +You can use the --link option to connect to any server running in a docker +container, but it needs to be called *xmpp*, or the custom value set for the +**BIBOUMI_XMPP_SERVER_IP** option. For example, if you are using a container +named ejabberd, you would use the option *--link ejabberd:xmpp*. + +If you want to connect to the XMPP server running on the host machine, use +the **--network=host** option. + +Volumes +------- + +The database is stored in the /var/lib/biboumi/ directory. If you don’t bind +a local directory to it, the database will be lost when the container is +stopped. If you want to keep your database between each run, bind it with +the -v option, like this: **-v /srv/biboumi/:/var/lib/biboumi**. diff --git a/docker/biboumi/README.rst b/docker/biboumi/README.rst deleted file mode 100644 index f6d529d..0000000 --- a/docker/biboumi/README.rst +++ /dev/null @@ -1,78 +0,0 @@ -Biboumi Docker Image -==================== - -Running -------- - -This image does not embed any XMPP server. You need to have a running XMPP -server first: as an other docker image, or running on the host machine. - -Assuming you have a running `prosody -`_ container already running and -`properly configured -`_ you can -use the following command to start your biboumi container. - -``` -docker run --link prosody:xmpp \ - -v $PWD/database:/var/lib/biboumi \ - -e BIBOUMI_PASSWORD=P4SSW0RD \ - -e BIBOUMI_HOSTNAME=irc.example.com \ - -e BIBOUMI_ADMIN=blabla \ - biboumi -``` - -If instead you already have an XMPP server running on the host machine, you -can start the biboumi container like this: - -``` -docker run --network=host \ - -v $PWD/database:/var/lib/biboumi \ - -e BIBOUMI_PASSWORD=P4SSW0RD \ - -e BIBOUMI_HOSTNAME=irc.example.com \ - -e BIBOUMI_ADMIN=blabla \ - -e BIBOUMI_XMPP_SERVER_IP=127.0.0.1 \ - biboumi -``` - -Variables ---------- - -The configuration file inside the image is a template that is completed when -the container is started, using the following environment variables: - -* BIBOUMI_HOSTNAME: Sets the value of the *hostname* option. -* BIBOUMI_SECRET: Sets the value of the *password* option. -* BIBOUMI_ADMIN: Sets the value of the *admin* option. -* BIBOUMI_XMPP_SERVER_IP: Sets the value of the *xmpp_server_ip* option. The default is **xmpp**. - -All these variables are optional, but biboumi will probably fail to start if -the hostname and secret are missing. - -You can also directly provide your own configuration file by mounting it -inside the container using the -v option: - -``` -docker run --link prosody:xmpp \ - -v $PWD/biboumi.cfg:/etc/biboumi/biboumi.cfg \ - biboumi -``` - -Linking with the XMPP server ----------------------------- - -You can use the --link option to connect to any server running in a docker -container, but it needs to be called *xmpp*, or the custom value set for the -**BIBOUMI_XMPP_SERVER_IP** option. For example, if you are using a container -named ejabberd, you would use the option *--link ejabberd:xmpp*. - -If you want to connect to the XMPP server running on the host machine, use -the **--network=host** option. - -Volumes -------- - -The database is stored in the /var/lib/biboumi/ directory. If you don’t bind -a local directory to it, the database will be lost when the container is -stopped. If you want to keep your database between each run, bind it with -the -v option, like this: **-v /srv/biboumi/:/var/lib/biboumi**. -- cgit v1.2.3 From e6e37a6f209ae2e9416b0da03ff21469cb4645b8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?louiz=E2=80=99?= Date: Wed, 1 Mar 2017 14:14:39 +0100 Subject: =?UTF-8?q?Don=E2=80=99t=20wrap=20the=20lines=20in=20docker/README?= =?UTF-8?q?.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docker/biboumi/README.md | 33 +++++++++------------------------ 1 file changed, 9 insertions(+), 24 deletions(-) (limited to 'docker') diff --git a/docker/biboumi/README.md b/docker/biboumi/README.md index 094bb78..e69c1b0 100644 --- a/docker/biboumi/README.md +++ b/docker/biboumi/README.md @@ -4,13 +4,9 @@ Biboumi Docker Image Running ------- -This image does not embed any XMPP server. You need to have a running XMPP -server first: as an other docker image, or running on the host machine. +This image does not embed any XMPP server. You need to have a running XMPP server first: as an other docker image, or running on the host machine. -Assuming you have a running [prosody](https://hub.docker.com/r/prosody/prosody/) -container already running and -[properly configured](https://prosody.im/doc/components#adding_an_external_component) -you can use the following command to start your biboumi container. +Assuming you have a running [prosody](https://hub.docker.com/r/prosody/prosody/) container already running and [properly configured](https://prosody.im/doc/components#adding_an_external_component) you can use the following command to start your biboumi container. ``` docker run --link prosody:xmpp \ @@ -21,8 +17,7 @@ docker run --link prosody:xmpp \ biboumi ``` -If instead you already have an XMPP server running on the host machine, you -can start the biboumi container like this: +If instead you already have an XMPP server running on the host machine, you can start the biboumi container like this: ``` docker run --network=host \ @@ -37,19 +32,16 @@ docker run --network=host \ Variables --------- -The configuration file inside the image is a template that is completed when -the container is started, using the following environment variables: +The configuration file inside the image is a template that is completed when the container is started, using the following environment variables: * BIBOUMI_HOSTNAME: Sets the value of the *hostname* option. * BIBOUMI_SECRET: Sets the value of the *password* option. * BIBOUMI_ADMIN: Sets the value of the *admin* option. * BIBOUMI_XMPP_SERVER_IP: Sets the value of the *xmpp_server_ip* option. The default is **xmpp**. -All these variables are optional, but biboumi will probably fail to start if -the hostname and secret are missing. +All these variables are optional, but biboumi will probably fail to start if the hostname and secret are missing. -You can also directly provide your own configuration file by mounting it -inside the container using the -v option: +You can also directly provide your own configuration file by mounting it inside the container using the -v option: ``` docker run --link prosody:xmpp \ @@ -60,18 +52,11 @@ docker run --link prosody:xmpp \ Linking with the XMPP server ---------------------------- -You can use the --link option to connect to any server running in a docker -container, but it needs to be called *xmpp*, or the custom value set for the -**BIBOUMI_XMPP_SERVER_IP** option. For example, if you are using a container -named ejabberd, you would use the option *--link ejabberd:xmpp*. +You can use the --link option to connect to any server running in a docker container, but it needs to be called *xmpp*, or the custom value set for the **BIBOUMI_XMPP_SERVER_IP** option. For example, if you are using a container named ejabberd, you would use the option *--link ejabberd:xmpp*. -If you want to connect to the XMPP server running on the host machine, use -the **--network=host** option. +If you want to connect to the XMPP server running on the host machine, use the **--network=host** option. Volumes ------- -The database is stored in the /var/lib/biboumi/ directory. If you don’t bind -a local directory to it, the database will be lost when the container is -stopped. If you want to keep your database between each run, bind it with -the -v option, like this: **-v /srv/biboumi/:/var/lib/biboumi**. +The database is stored in the /var/lib/biboumi/ directory. If you don’t bind a local directory to it, the database will be lost when the container is stopped. If you want to keep your database between each run, bind it with the -v option, like this: **-v /srv/biboumi/:/var/lib/biboumi**. -- cgit v1.2.3 From 11c63ebceb07d9b65ed16182139477ea79739c12 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?louiz=E2=80=99?= Date: Mon, 6 Mar 2017 01:22:51 +0100 Subject: Add the gcrypt dependency to the biboumi-test docker images --- docker/biboumi-test/debian/Dockerfile.base | 1 + docker/biboumi-test/fedora/Dockerfile.base | 1 + 2 files changed, 2 insertions(+) (limited to 'docker') diff --git a/docker/biboumi-test/debian/Dockerfile.base b/docker/biboumi-test/debian/Dockerfile.base index 125c048..e609feb 100644 --- a/docker/biboumi-test/debian/Dockerfile.base +++ b/docker/biboumi-test/debian/Dockerfile.base @@ -14,6 +14,7 @@ RUN apt install -y g++\ libudns-dev\ libsqlite3-dev\ libuuid1\ + libgcrypt20-dev\ cmake\ make\ libexpat1-dev\ diff --git a/docker/biboumi-test/fedora/Dockerfile.base b/docker/biboumi-test/fedora/Dockerfile.base index 0fd3095..dd536e5 100644 --- a/docker/biboumi-test/fedora/Dockerfile.base +++ b/docker/biboumi-test/fedora/Dockerfile.base @@ -12,6 +12,7 @@ RUN dnf --refresh install -y\ udns-devel\ sqlite-devel\ libuuid-devel\ + libgcrypt-devel\ cmake\ make\ expat-devel\ -- cgit v1.2.3 From 5d0bae65975eb7cb92543f13554f95386b50467e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?louiz=E2=80=99?= Date: Tue, 21 Mar 2017 15:01:28 +0100 Subject: Re-add the c-ares lib in the docker test images --- docker/biboumi-test/debian/Dockerfile.base | 1 + docker/biboumi-test/fedora/Dockerfile.base | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) (limited to 'docker') diff --git a/docker/biboumi-test/debian/Dockerfile.base b/docker/biboumi-test/debian/Dockerfile.base index e609feb..f5d061b 100644 --- a/docker/biboumi-test/debian/Dockerfile.base +++ b/docker/biboumi-test/debian/Dockerfile.base @@ -12,6 +12,7 @@ RUN apt install -y g++\ clang\ valgrind\ libudns-dev\ + libc-ares-dev\ libsqlite3-dev\ libuuid1\ libgcrypt20-dev\ diff --git a/docker/biboumi-test/fedora/Dockerfile.base b/docker/biboumi-test/fedora/Dockerfile.base index dd536e5..20984a2 100644 --- a/docker/biboumi-test/fedora/Dockerfile.base +++ b/docker/biboumi-test/fedora/Dockerfile.base @@ -10,6 +10,7 @@ RUN dnf --refresh install -y\ clang\ valgrind\ udns-devel\ + c-ares-devel\ sqlite-devel\ libuuid-devel\ libgcrypt-devel\ @@ -56,4 +57,3 @@ 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 COPY coverity /home/tester/coverity -COPY sonar-scanner-2.8 /home/tester/sonar-scanner -- cgit v1.2.3 From 7d2b8eb5268fe5b85f004eced289b7d61224e3c7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?louiz=E2=80=99?= Date: Wed, 12 Apr 2017 18:26:30 +0200 Subject: Always chown biboumi /var/lib/biboumi when the docker container starts This fixes permission problems when we bind a volume that is not owned by the biboumi user. --- docker/biboumi/Dockerfile | 3 --- docker/biboumi/entrypoint.sh | 4 +++- 2 files changed, 3 insertions(+), 4 deletions(-) (limited to 'docker') diff --git a/docker/biboumi/Dockerfile b/docker/biboumi/Dockerfile index 721d106..7c8d78d 100644 --- a/docker/biboumi/Dockerfile +++ b/docker/biboumi/Dockerfile @@ -35,7 +35,6 @@ RUN git clone git://git.louiz.org/biboumi && mkdir ./biboumi/build && cd ./bibou RUN useradd 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 @@ -44,5 +43,3 @@ COPY ./entrypoint.sh /entrypoint.sh RUN chmod 755 /entrypoint.sh ENTRYPOINT ["/entrypoint.sh"] - -USER biboumi diff --git a/docker/biboumi/entrypoint.sh b/docker/biboumi/entrypoint.sh index eda53a4..8b9b869 100644 --- a/docker/biboumi/entrypoint.sh +++ b/docker/biboumi/entrypoint.sh @@ -5,7 +5,9 @@ sed -i s/BIBOUMI_HOSTNAME/${BIBOUMI_HOSTNAME:-biboumi.localhost}/ /etc/biboumi/b sed -i s/BIBOUMI_ADMIN/${BIBOUMI_ADMIN:-}/ /etc/biboumi/biboumi.cfg sed -i s/BIBOUMI_PASSWORD/${BIBOUMI_PASSWORD:-missing_password}/ /etc/biboumi/biboumi.cfg +chown -R biboumi:biboumi /var/lib/biboumi + echo "Running biboumi with the following conf: " cat /etc/biboumi/biboumi.cfg -/usr/bin/biboumi /etc/biboumi/biboumi.cfg +runuser -u biboumi /usr/bin/biboumi /etc/biboumi/biboumi.cfg -- cgit v1.2.3 From 4fde4d7369ff2f54f4216704a4fd51a974f53885 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?louiz=E2=80=99?= Date: Wed, 12 Apr 2017 19:27:52 +0200 Subject: =?UTF-8?q?docker:=20Run=20the=20process=20using=20=E2=80=9Cexec?= =?UTF-8?q?=E2=80=9D,=20to=20be=20able=20to=20cleanly=20receive=20signals?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docker/biboumi/entrypoint.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'docker') diff --git a/docker/biboumi/entrypoint.sh b/docker/biboumi/entrypoint.sh index 8b9b869..af61260 100644 --- a/docker/biboumi/entrypoint.sh +++ b/docker/biboumi/entrypoint.sh @@ -10,4 +10,4 @@ chown -R biboumi:biboumi /var/lib/biboumi echo "Running biboumi with the following conf: " cat /etc/biboumi/biboumi.cfg -runuser -u biboumi /usr/bin/biboumi /etc/biboumi/biboumi.cfg +exec runuser -u biboumi /usr/bin/biboumi /etc/biboumi/biboumi.cfg -- cgit v1.2.3 From 06094245e9c17d10f7df835d1f9ad1a679b1bf67 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?louiz=E2=80=99?= Date: Thu, 20 Apr 2017 22:44:14 +0200 Subject: Add a e2e test on alpine --- docker/biboumi-test/alpine/Dockerfile | 10 ++++++ docker/biboumi-test/alpine/Dockerfile.base | 51 ++++++++++++++++++++++++++++++ 2 files changed, 61 insertions(+) create mode 100644 docker/biboumi-test/alpine/Dockerfile create mode 100644 docker/biboumi-test/alpine/Dockerfile.base (limited to 'docker') diff --git a/docker/biboumi-test/alpine/Dockerfile b/docker/biboumi-test/alpine/Dockerfile new file mode 100644 index 0000000..ab288b6 --- /dev/null +++ b/docker/biboumi-test/alpine/Dockerfile @@ -0,0 +1,10 @@ +# 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.louiz.org/biboumi-test-alpine-base + +# 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 && ldconfig || true + +WORKDIR /home/tester +USER tester diff --git a/docker/biboumi-test/alpine/Dockerfile.base b/docker/biboumi-test/alpine/Dockerfile.base new file mode 100644 index 0000000..dffa1d1 --- /dev/null +++ b/docker/biboumi-test/alpine/Dockerfile.base @@ -0,0 +1,51 @@ +# 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\ + c-ares-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 + +# 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 -- cgit v1.2.3 From 3666f35e0e884068437fe520dbd5f087bea4d946 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?louiz=E2=80=99?= Date: Fri, 21 Apr 2017 11:49:23 +0200 Subject: Use alpine for the docker image, and simplify the config + run stuff MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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. --- docker/biboumi/Dockerfile | 35 +++++++++++++++++------------------ docker/biboumi/README.md | 16 +++++++++++----- docker/biboumi/biboumi.cfg | 8 ++++---- docker/biboumi/entrypoint.sh | 13 ------------- 4 files changed, 32 insertions(+), 40 deletions(-) delete mode 100644 docker/biboumi/entrypoint.sh (limited to 'docker') diff --git a/docker/biboumi/Dockerfile b/docker/biboumi/Dockerfile index 7c8d78d..d27421b 100644 --- a/docker/biboumi/Dockerfile +++ b/docker/biboumi/Dockerfile @@ -1,26 +1,25 @@ # This Dockerfile creates a docker image running biboumi -FROM docker.io/fedora:latest +FROM docker.io/alpine:latest -RUN dnf --refresh install -y\ - gcc-c++\ +RUN apk add --no-cache\ + g++\ cmake\ make\ - udns-devel\ - sqlite-devel\ - libuuid-devel\ - expat-devel\ - libidn-devel\ - systemd-devel\ + udns-dev\ + sqlite-dev\ + libuuid\ + util-linux-dev\ + expat-dev\ + libidn-dev\ git\ - python\ - && dnf clean all + python2 # 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 +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 && ldconfig && rm -rf /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 &&\ @@ -29,17 +28,17 @@ RUN git clone git://git.louiz.org/biboumi && mkdir ./biboumi/build && cd ./bibou -DWITH_BOTAN=1\ -DWITH_LITESQL=1\ -DWITH_LIBIDN=1\ - -DWITH_SYSTEMD=1\ && make -j8 && make install && rm -rf /biboumi -RUN useradd 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 -COPY ./entrypoint.sh /entrypoint.sh -RUN chmod 755 /entrypoint.sh +WORKDIR /home/biboumi +USER biboumi -ENTRYPOINT ["/entrypoint.sh"] +CMD ["/usr/bin/biboumi", "/etc/biboumi/biboumi.cfg"] diff --git a/docker/biboumi/README.md b/docker/biboumi/README.md index e69c1b0..4b9e1e5 100644 --- a/docker/biboumi/README.md +++ b/docker/biboumi/README.md @@ -32,14 +32,12 @@ docker run --network=host \ Variables --------- -The configuration file inside the image is a template that is completed when the container is started, using the following environment variables: +The configuration file inside the image contains only a few default values. To be able to run, biboumi needs additional configuration. Additional options can be passed using environment variables. Any configuration option can be customized this way (see biboumi’s doc), but the main are listed here for convenience: * BIBOUMI_HOSTNAME: Sets the value of the *hostname* option. -* BIBOUMI_SECRET: Sets the value of the *password* option. +* BIBOUMI_PASSWORD: Sets the value of the *password* option. * BIBOUMI_ADMIN: Sets the value of the *admin* option. -* BIBOUMI_XMPP_SERVER_IP: Sets the value of the *xmpp_server_ip* option. The default is **xmpp**. - -All these variables are optional, but biboumi will probably fail to start if the hostname and secret are missing. +* BIBOUMI_XMPP_SERVER_IP: Sets the value of the *xmpp_server_ip* option. The default value is **xmpp**. You can also directly provide your own configuration file by mounting it inside the container using the -v option: @@ -49,6 +47,8 @@ docker run --link prosody:xmpp \ biboumi ``` +If both a custom configuration file and custom environment variables are passed to the container, the environment variables will take precedence. + Linking with the XMPP server ---------------------------- @@ -60,3 +60,9 @@ Volumes ------- The database is stored in the /var/lib/biboumi/ directory. If you don’t bind a local directory to it, the database will be lost when the container is stopped. If you want to keep your database between each run, bind it with the -v option, like this: **-v /srv/biboumi/:/var/lib/biboumi**. + +Note: Due to a limitation in Docker, to be able to read and write into this database, make sure this mounted directory is owned by UID and GID 1001:1001, on the host. + +``` +chown -R 1001:1001 database/ +``` diff --git a/docker/biboumi/biboumi.cfg b/docker/biboumi/biboumi.cfg index cc5df61..98c5a9f 100644 --- a/docker/biboumi/biboumi.cfg +++ b/docker/biboumi/biboumi.cfg @@ -1,6 +1,6 @@ -xmpp_server_ip=BIBOUMI_XMPP_SERVER_IP +xmpp_server_ip=127.0.0.1 port=5347 db_name=/var/lib/biboumi/biboumi.sqlite -hostname=BIBOUMI_HOSTNAME -password=BIBOUMI_PASSWORD -admin=BIBOUMI_ADMIN +hostname=xmpp +password= +admin= diff --git a/docker/biboumi/entrypoint.sh b/docker/biboumi/entrypoint.sh deleted file mode 100644 index af61260..0000000 --- a/docker/biboumi/entrypoint.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/bash - -sed -i s/BIBOUMI_XMPP_SERVER_IP/${BIBOUMI_XMPP_SERVER_IP:-xmpp}/ /etc/biboumi/biboumi.cfg -sed -i s/BIBOUMI_HOSTNAME/${BIBOUMI_HOSTNAME:-biboumi.localhost}/ /etc/biboumi/biboumi.cfg -sed -i s/BIBOUMI_ADMIN/${BIBOUMI_ADMIN:-}/ /etc/biboumi/biboumi.cfg -sed -i s/BIBOUMI_PASSWORD/${BIBOUMI_PASSWORD:-missing_password}/ /etc/biboumi/biboumi.cfg - -chown -R biboumi:biboumi /var/lib/biboumi - -echo "Running biboumi with the following conf: " -cat /etc/biboumi/biboumi.cfg - -exec runuser -u biboumi /usr/bin/biboumi /etc/biboumi/biboumi.cfg -- cgit v1.2.3 From 97f01d8e125c257a0011c4c275319595003a63f6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?louiz=E2=80=99?= Date: Wed, 24 May 2017 13:43:49 +0200 Subject: Add biboumi-test-archlinux and biboumi-debian-packaging Dockerfiles --- docker/biboumi-test/archlinux/Dockerfile | 13 +++++++++++++ docker/packaging/debian/Dockerfile | 10 ++++++++++ 2 files changed, 23 insertions(+) create mode 100644 docker/biboumi-test/archlinux/Dockerfile create mode 100644 docker/packaging/debian/Dockerfile (limited to 'docker') diff --git a/docker/biboumi-test/archlinux/Dockerfile b/docker/biboumi-test/archlinux/Dockerfile new file mode 100644 index 0000000..20f0343 --- /dev/null +++ b/docker/biboumi-test/archlinux/Dockerfile @@ -0,0 +1,13 @@ +FROM docker.io/base/archlinux:latest + +RUN pacman -Syuuuu --noconfirm + +RUN pacman -Syu --noconfirm cmake base-devel git clang-tools-extra + +RUN useradd -m -G wheel -s /bin/bash builder + +RUN sed -i '/^# %wheel ALL=(ALL) NOPASSWD: ALL/s/^# //' /etc/sudoers + +WORKDIR /home/builder + +USER builder diff --git a/docker/packaging/debian/Dockerfile b/docker/packaging/debian/Dockerfile new file mode 100644 index 0000000..f9f4d84 --- /dev/null +++ b/docker/packaging/debian/Dockerfile @@ -0,0 +1,10 @@ +# This Dockerfile creates a docker image suitable to build a debian package + +FROM docker.io/debian:sid + +RUN apt update + +# Needed to build biboumi +RUN apt install -y \ + git \ + devscripts -- cgit v1.2.3