-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile
80 lines (73 loc) · 1.88 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
FROM ubuntu:16.04 AS build
ENV LANG C.UTF-8
ENV KEA_VERSION 1.3.0
RUN apt update && apt -y --no-install-recommends --no-upgrade install \
# Build deps
make \
automake \
g++ \
dh-autoreconf \
# Tools deps
unzip \
wget \
# kea deps
libtool \
autoconf \
libssl-dev \
liblog4cplus-dev \
libboost-system-dev \
libpq-dev \
postgresql-server-dev-all \
## build kea
&& cd / \
&& wget -O kea.tar.gz --no-check-certificate https://ftp.isc.org/isc/kea/$KEA_VERSION/kea-$KEA_VERSION.tar.gz \
&& mkdir -p /usr/src/kea \
&& tar xf kea.tar.gz --strip-components=1 -C /usr/src/kea \
&& rm kea.tar.gz \
&& cd /usr/src/kea \
&& autoreconf \
--install \
&& CXXFLAGS='-Os' ./configure \
--prefix=/usr \
--sysconfdir=/etc \
--localstatedir=/var \
--with-log4cplus \
--with-dhcp-pgsql \
--with-openssl \
--enable-static=false \
&& make -j "$(getconf _NPROCESSORS_ONLN)" \
&& make install \
## cleanup
&& rm -rf /usr/src \
&& apt purge -y --allow-remove-essential \
make \
automake \
g++ \
dh-autoreconf \
unzip \
wget \
libtool \
autoconf \
libssl-dev \
liblog4cplus-dev \
e2fslibs \
postgresql-server-dev-all \
&& apt remove --purge -y --allow-remove-essential $(apt-mark showauto) \
&& apt autoremove -y \
&& apt install -y --no-install-recommends --no-upgrade \
freeipmi-tools \
liblog4cplus-dev \
libboost-system-dev \
libpq-dev \
python3 \
python3-pip \
python3-setuptools \
python3-wheel
WORKDIR /code/
COPY setup.py /code/
COPY ipmi_finder /code/
COPY launch-services.sh /launch-services.sh
RUN pip3 install -e /code/ \
&& chmod o+rx /launch-services.sh
EXPOSE 67/udp
CMD ["/launch-services.sh"]