~singpolyma/biboumi

ref: 692f5a4e6619269f60fabb1201a5d6e837c65480 biboumi/docker/biboumi/alpine/Dockerfile -rw-r--r-- 1.3 KiB
692f5a4e — louiz’ docker: use botan package from alpine instead of building from sources 1 year, 5 months ago
                                                                                
90b3c07b louiz’
22cb2659 louiz’
90b3c07b louiz’
eb082d15 louiz’
3e0de812 Stefan Schwarz
692f5a4e louiz’
eb082d15 louiz’
3e0de812 Stefan Schwarz
eb082d15 louiz’
3e0de812 Stefan Schwarz
eb082d15 louiz’
90b3c07b louiz’
3e0de812 Stefan Schwarz
692f5a4e louiz’
3e0de812 Stefan Schwarz
f90969e1 louiz’
6187423e louiz’
3e0de812 Stefan Schwarz
6c35f49d louiz’
3666f35e louiz’
6c35f49d louiz’
3666f35e louiz’
3e0de812 Stefan Schwarz
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
# This Dockerfile creates a docker image running biboumi
#
# It is built by compiling the sources and all its dependencies
# directly inside the image.
# 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 botan-dev


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 libidn libpq libstdc++ libuuid postgresql-libs \
        sqlite-libs udns expat ca-certificates botan

COPY --from=builder /etc/biboumi /etc/biboumi
COPY --from=builder /usr/bin/biboumi /usr/bin/biboumi

COPY ./biboumi.cfg /etc/biboumi/biboumi.cfg

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"]