-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
10 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,42 +1,19 @@ | ||
FROM ubuntu:22.04 as builder | ||
FROM alpine:3.17 | ||
|
||
ARG LIBDLT_VERSION=v2.18.8 | ||
|
||
RUN set -ex \ | ||
&& apt-get update \ | ||
&& apt-get upgrade -y \ | ||
&& apt-get install -y build-essential git cmake libdbus-1-dev cmake-data \ | ||
libdbus-1-dev systemd libsystemd-dev wget curl zlib1g-dev | ||
|
||
# Install libdlt | ||
RUN set -ex \ | ||
&& apk update \ | ||
&& apk add build-base musl-dev linux-headers git cmake ninja \ | ||
wget curl dbus zlib python3 py3-pip \ | ||
&& pip install --no-cache-dir tox virtualenv \ | ||
&& git clone https://github.com/GENIVI/dlt-daemon \ | ||
&& cd /dlt-daemon \ | ||
&& git checkout ${LIBDLT_VERSION} \ | ||
&& cd /dlt-daemon \ | ||
&& cmake CMakeLists.txt \ | ||
&& make \ | ||
&& make install | ||
|
||
FROM ubuntu:22.04 | ||
|
||
# Install libdlt.so | ||
COPY --from=builder /usr/local/lib /usr/local/lib | ||
|
||
RUN set -ex \ | ||
&& ldconfig | ||
|
||
RUN set -ex \ | ||
&& apt-get update \ | ||
&& apt-get upgrade -y \ | ||
&& apt-get install -y python3 python3-pip python-is-python3 git \ | ||
&& pip3 install --no-cache-dir setuptools tox \ | ||
&& apt-get clean all \ | ||
&& rm -rf \ | ||
/var/cache/debconf/* \ | ||
/var/lib/apt/lists/* \ | ||
/var/log/* \ | ||
/tmp/* \ | ||
/var/tmp/* | ||
&& make -j \ | ||
&& make install \ | ||
&& ldconfig /usr/local/lib | ||
|
||
# vim: set ft=dockerfile : |