This repository has been archived by the owner on Apr 6, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDockerfile
88 lines (70 loc) · 1.98 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
#
# Copyright (2019) Petr Ospalý <petr@ospalax.cz>
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
#
ARG ALPINE_VERSION
FROM alpine:${ALPINE_VERSION} AS builder
ARG KEA_VERSION
ARG KEA_INSTALLPREFIX
ARG MAKE_JOBS
ARG KEEP_BUILDBLOB
ARG KEEP_BUILDDEPS
ARG INSTALL_HOOKS
ENV KEA_VERSION "${KEA_VERSION}"
ENV KEA_INSTALLPREFIX "${KEA_INSTALLPREFIX}"
ENV MAKE_JOBS "${MAKE_JOBS}"
ENV KEEP_BUILDBLOB "${KEEP_BUILDBLOB}"
ENV KEEP_BUILDDEPS "${KEEP_BUILDDEPS}"
ENV INSTALL_HOOKS "${INSTALL_HOOKS}"
#
# build and install ISC Kea
#
# ikea script
WORKDIR /ikea
COPY ikea.sh ./
RUN chmod 0755 ikea.sh
# first stage: suite
RUN env KEEP_BUILDDEPS=yes ./ikea.sh suite
# second stage: hooks
COPY src/hooks/ ./hooks/
RUN ./ikea.sh hooks
###############################################################################
# final image
###############################################################################
ARG ALPINE_VERSION
FROM alpine:${ALPINE_VERSION}
LABEL maintainer="Petr Ospalý (osp) <petr@ospalax.cz>"
ARG KEA_VERSION
ARG KEA_INSTALLPREFIX
ENV KEA_VERSION "${KEA_VERSION}"
ENV KEA_INSTALLPREFIX "${KEA_INSTALLPREFIX}"
RUN \
apk update \
&& \
apk add --no-cache \
boost \
postgresql-client \
mariadb-client \
mariadb-connector-c \
cassandra-cpp-driver \
openssl \
ca-certificates \
curl \
xz \
python3 \
&& \
apk add --no-cache \
--repository http://dl-cdn.alpinelinux.org/alpine/edge/testing \
log4cplus \
&& \
rm -rf /var/cache/apk/*
# install build artifact
COPY --from=builder "${KEA_INSTALLPREFIX}" "${KEA_INSTALLPREFIX}"
COPY --from=builder /etc/ld-musl-* /etc/
RUN ldconfig "${KEA_INSTALLPREFIX}/lib"
# run microservice
#ENTRYPOINT ["${KEA_INSTALLPREFIX}/sbin/kea-dhcp4"]
#CMD ["-c", "${KEA_INSTALLPREFIX}/etc/kea/kea-dhcp4.conf"]