-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
34 lines (34 loc) · 1.05 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
FROM debian as builder
MAINTAINER Benjamin Fahl <[email protected]>
ENV DEBIAN_FRONTEND noninteractive
ENV DEBIAN_FRONTEND newt
RUN apt-get update \
&& apt-get install -y \
make \
automake \
libtool \
clang \
gcc \
git \
libcunit1-dev \
doxygen \
libxml2-utils \
xsltproc \
docbook-xml \
asciidoc
ENV DEBIAN_FRONTEND newt
RUN git clone --depth 1 --recursive -b dtls https://github.com/home-assistant/libcoap.git \
&& cd libcoap \
&& ./autogen.sh \
&& ./configure --disable-documentation --disable-shared --without-debug CFLAGS="-D COAP_DEBUG_FD=stderr" \
&& make \
&& make install \
&& cd .. \
&& rm -rf libcoap
FROM debian:stable-slim as runner
COPY --from=builder ./usr/local/bin/coap-client /usr/local/bin/coap-client
COPY --from=builder ./usr/local/bin/coap-server /usr/local/bin/coap-server
COPY --from=builder ./usr/local/bin/coap-rd /usr/local/bin/coap-rd
COPY docker-entrypoint.sh /docker-entrypoint.sh
ENTRYPOINT ["/bin/sh", "/docker-entrypoint.sh"]
CMD ["/usr/local/bin/coap-client"]