-
-
Notifications
You must be signed in to change notification settings - Fork 62
/
Dockerfile-build-alpine
42 lines (36 loc) · 1.04 KB
/
Dockerfile-build-alpine
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
FROM --platform=$BUILDPLATFORM tonistiigi/xx AS xx
FROM --platform=$BUILDPLATFORM alpine:3.19
ARG BUILD_PACKAGES="\
clang \
make \
cmake \
lld \
curl \
pkgconfig"
RUN apk add --no-cache ${BUILD_PACKAGES}
ARG LMS_BUILD_PACKAGES=" \
gcc \
g++ \
musl-dev \
benchmark-dev \
boost-dev \
ffmpeg-dev \
libarchive-dev \
libconfig-dev \
taglib-dev \
stb \
wt-dev \
gtest-dev"
COPY --from=xx / /
ARG TARGETPLATFORM
RUN xx-apk add --no-scripts --no-cache ${LMS_BUILD_PACKAGES}
# LMS
COPY . /tmp/lms/
ARG LMS_BUILD_TYPE="Release"
RUN \
DIR=/tmp/lms/build && mkdir -p ${DIR} && cd ${DIR} && \
xx-info is-cross && export BUILD_TESTS=OFF || export BUILD_TESTS=ON && \
PKG_CONFIG_PATH=/$(xx-info)/usr/lib/pkgconfig cmake /tmp/lms/ -DCMAKE_INCLUDE_PATH=/$(xx-info)/usr/include -DCMAKE_BUILD_TYPE=${LMS_BUILD_TYPE} $(xx-clang --print-cmake-defines) -DCMAKE_PREFIX_PATH=/$(xx-info)/usr/lib/cmake -DBUILD_TESTING=${BUILD_TESTS} -DBUILD_BENCHMARKS=ON && \
VERBOSE=1 make -j$(nproc) && \
xx-verify src/lms/lms && \
(xx-info is-cross || make test)