Revert "Split the biboumi dockerfile into two, to be able to disable the cache"

This reverts commit 26eb28dc23.
This commit is contained in:
louiz’
2017-02-28 23:46:55 +01:00
parent 58b3345f85
commit 90b3c07b6c
5 changed files with 24 additions and 61 deletions
+1 -1
View File
@@ -176,5 +176,5 @@ packaging:docker:
before_script: [] before_script: []
script: script:
- docker login -p $DOCKER_PASSWORD -u louiz - docker login -p $DOCKER_PASSWORD -u louiz
- ./docker/biboumi/build-docker.sh louiz/biboumi - docker build -t louiz/biboumi docker/biboumi
- docker push louiz/biboumi - docker push louiz/biboumi
+23 -3
View File
@@ -1,8 +1,28 @@
# This dockerfile uses the image built using Dockerfile.base, and installs # This Dockerfile creates a docker image running biboumi
# biboumi in it
FROM biboumi-base 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 &&\ RUN git clone git://git.louiz.org/biboumi && mkdir ./biboumi/build && cd ./biboumi/build &&\
cmake .. -DCMAKE_INSTALL_PREFIX=/usr\ cmake .. -DCMAKE_INSTALL_PREFIX=/usr\
-DCMAKE_BUILD_TYPE=Release\ -DCMAKE_BUILD_TYPE=Release\
-23
View File
@@ -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
-20
View File
@@ -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 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 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 -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
```
-14
View File
@@ -1,14 +0,0 @@
#!/bin/sh
if [[ -z "$1" ]]; then
echo "Usage: ./build-docker.sh <image_name>"
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