-
Notifications
You must be signed in to change notification settings - Fork 7
/
Dockerfile
46 lines (35 loc) · 1.19 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
FROM alpine:3.17 as builder
ARG LIBDLT_VERSION=v2.18.8
RUN set -ex \
&& apk update \
&& apk add build-base musl-dev linux-headers git cmake ninja wget curl dbus zlib
# Install libdlt
RUN set -ex \
&& git clone https://github.com/GENIVI/dlt-daemon \
&& cd /dlt-daemon \
&& git checkout ${LIBDLT_VERSION} \
&& cd /dlt-daemon \
&& cmake CMakeLists.txt \
&& make -j \
&& make install
COPY . /build/dltlyse
RUN set -ex \
&& apk add python3 py3-pip py3-virtualenv \
&& cd /build/dltlyse \
&& pip install --no-cache-dir build wheel \
&& python3 -m build --wheel \
&& git clone https://github.com/bmwcarit/python-dlt /build/python-dlt \
&& cd /build/python-dlt \
&& python3 -m build --wheel
FROM alpine:3.17
COPY --from=builder /usr/local/lib /usr/local/lib
COPY --from=builder /build/dltlyse/dist/dltlyse*.whl /
COPY --from=builder /build/python-dlt/dist/dlt*.whl /
RUN set -ex \
&& ldconfig /usr/local/lib \
&& apk add --no-cache python3 py3-six \
&& apk add --no-cache --virtual .build-deps py3-pip git \
&& pip install --no-cache-dir dlt*.whl dltlyse*.whl \
&& apk del .build-deps
ENTRYPOINT [ "dltlyse" ]
CMD [ "--help" ]