This repository has been archived by the owner on Oct 20, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 80
/
Dockerfile
105 lines (98 loc) · 3.47 KB
/
Dockerfile
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
FROM alpine:latest AS builder
COPY README.md /opt/glewlwyd/README.md
COPY CHANGELOG.md /opt/glewlwyd/CHANGELOG.md
COPY docs/ /opt/glewlwyd/docs/
COPY src/ /opt/glewlwyd/src/
COPY CMakeLists.txt /opt/glewlwyd/
COPY cmake-modules/ /opt/glewlwyd/cmake-modules/
COPY webapp/ /opt/glewlwyd/webapp/
# Install required packages
RUN apk add --no-cache \
git \
make \
cmake \
wget \
gcc \
g++ \
jansson-dev \
gnutls-dev \
autoconf \
automake \
libmicrohttpd-dev \
libcurl \
curl-dev \
libconfig-dev \
libgcrypt-dev \
sqlite-dev \
mariadb-dev \
postgresql-dev \
util-linux-dev \
openldap-dev \
bash \
oath-toolkit-dev \
libtool \
libcbor-dev && \
mkdir -p /opt/orcania/build && cd /opt/orcania/ && \
tar xvf /opt/glewlwyd/docs/docker/orcania.tar.gz --strip 1 && \
cd /opt/orcania/build && \
cmake -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_INSTALL_LIBDIR=lib -DBUILD_BASE64URL=OFF .. && \
make && make install && \
mkdir -p /opt/yder/build && cd /opt/yder/ && \
tar xvf /opt/glewlwyd/docs/docker/yder.tar.gz --strip 1 && \
cd /opt/yder/build && \
cmake -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_INSTALL_LIBDIR=lib -DWITH_JOURNALD=OFF .. && \
make && make install && \
mkdir -p /opt/ulfius/build && cd /opt/ulfius/ && \
tar xvf /opt/glewlwyd/docs/docker/ulfius.tar.gz --strip 1 && \
cd /opt/ulfius/build && \
cmake -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_INSTALL_LIBDIR=lib -DBUILD_UWSC=OFF .. && \
make && make install && \
mkdir -p /opt/hoel/build && cd /opt/hoel/ && \
tar xvf /opt/glewlwyd/docs/docker/hoel.tar.gz --strip 1 && \
cd /opt/hoel/build && \
cmake -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_INSTALL_LIBDIR=lib .. && \
make && make install && \
mkdir -p /opt/rhonabwy/build && cd /opt/rhonabwy/ && \
tar xvf /opt/glewlwyd/docs/docker/rhonabwy.tar.gz --strip 1 && \
cd /opt/rhonabwy/build && \
cmake -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_INSTALL_LIBDIR=lib -DBUILD_RNBYC=OFF .. && \
make && make install && \
mkdir -p /opt/iddawc/build && cd /opt/iddawc/ && \
tar xvf /opt/glewlwyd/docs/docker/iddawc.tar.gz --strip 1 && \
cd /opt/iddawc/build && \
cmake -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_INSTALL_LIBDIR=lib .. && \
make && make install && \
mkdir -p /opt/glewlwyd/build && cd /opt/glewlwyd/build/ && \
cmake -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_INSTALL_LIBDIR=lib .. && \
make && make install
FROM alpine:latest AS runner
RUN apk add --no-cache \
wget \
sqlite \
libconfig \
jansson \
gnutls \
libcurl \
libldap \
libmicrohttpd \
sqlite-libs \
libpq \
oath-toolkit-liboath \
mariadb-connector-c \
libcbor \
bash
COPY --from=builder /usr/lib/liborcania* /usr/lib/
COPY --from=builder /usr/lib/libyder* /usr/lib/
COPY --from=builder /usr/lib/libhoel* /usr/lib/
COPY --from=builder /usr/lib/libulfius* /usr/lib/
COPY --from=builder /usr/lib/librhonabwy* /usr/lib/
COPY --from=builder /usr/lib/libiddawc* /usr/lib/
COPY --from=builder /usr/lib/glewlwyd/ /usr/lib/glewlwyd/
COPY --from=builder /usr/bin/glewlwyd /usr/bin
COPY --from=builder /usr/share/glewlwyd/ /usr/share/glewlwyd/
COPY --from=builder /usr/share/glewlwyd/webapp/config.json /etc/glewlwyd/
COPY --from=builder /usr/etc/glewlwyd/ /etc/glewlwyd/
RUN rm /usr/share/glewlwyd/webapp/config.json
RUN cp /etc/glewlwyd/config.json /usr/share/glewlwyd/webapp/config.json
COPY ["docs/docker/entrypoint.sh", "/"]
CMD ["/entrypoint.sh"]