Debian Codegraph @

Dockerfile

raw
1 FROM alpine:3.17 as builder
2
3 ARG LIBDLT_VERSION=v2.18.8
4
5 RUN set -ex \
6 && apk update \
7 && apk add build-base musl-dev linux-headers git cmake ninja wget curl dbus zlib
8
9 # Install libdlt
10 RUN set -ex \
11 && git clone https://github.com/GENIVI/dlt-daemon \
12 && cd /dlt-daemon \
13 && git checkout ${LIBDLT_VERSION} \
14 && cd /dlt-daemon \
15 && cmake CMakeLists.txt \
16 && make -j \
17 && make install
18
19
20 COPY . /build/dltlyse
21
22 RUN set -ex \
23 && apk add python3 py3-pip py3-virtualenv \
24 && cd /build/dltlyse \
25 && pip install --no-cache-dir build wheel \
26 && python3 -m build --wheel \
27 && git clone https://github.com/bmwcarit/python-dlt /build/python-dlt \
28 && cd /build/python-dlt \
29 && python3 -m build --wheel
30
31 FROM alpine:3.17
32
33 COPY --from=builder /usr/local/lib /usr/local/lib
34 COPY --from=builder /build/dltlyse/dist/dltlyse*.whl /
35 COPY --from=builder /build/python-dlt/dist/dlt*.whl /
36
37 RUN set -ex \
38 && ldconfig /usr/local/lib \
39 && apk add --no-cache python3 py3-six \
40 && apk add --no-cache --virtual .build-deps py3-pip git \
41 && pip install --no-cache-dir dlt*.whl dltlyse*.whl \
42 && apk del .build-deps
43
44 ENTRYPOINT [ "dltlyse" ]
45
46 CMD [ "--help" ]