Skip to content

Commit

Permalink
Run CI with alpine
Browse files Browse the repository at this point in the history
  • Loading branch information
yen3 authored and aigarius committed Nov 23, 2022
1 parent b8c5d4c commit 47b7e0b
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 31 deletions.
2 changes: 2 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
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
Expand Down
39 changes: 8 additions & 31 deletions Dockerfile.github_flow
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 :

0 comments on commit 47b7e0b

Please sign in to comment.