This repository has been archived by the owner on May 5, 2022. It is now read-only.
forked from AxisCommunications/docker-acap
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile.acap
50 lines (44 loc) · 2.16 KB
/
Dockerfile.acap
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
47
48
49
50
ARG ACAPARCH=armv7hf
ARG BUILD_IMAGE=axisecp/acap-native-sdk:1.0_beta2-${ACAPARCH}-ubuntu20.04
FROM $BUILD_IMAGE AS ps
ARG PROCPS_VERSION=v3.3.17
ARG BUILD_DIR=/build
ARG EXPORT_DIR=/export
RUN apt-get update \
&& apt-get -q install -y -f --no-install-recommends \
automake \
autopoint \
gettext \
git \
libtool
RUN ln -s /usr/bin/libtoolize /usr/bin/libtool
WORKDIR $BUILD_DIR
RUN git clone --depth 1 -b $PROCPS_VERSION 'https://gitlab.com/procps-ng/procps' .
ARG BUILD_CACHE=build.cache
RUN echo ac_cv_func_realloc_0_nonnull=yes >$BUILD_CACHE \
&& echo ac_cv_func_malloc_0_nonnull=yes >>$BUILD_CACHE
RUN . /opt/axis/acapsdk/environment-setup* \
&& ./autogen.sh \
&& ./configure --host=${TARGET_PREFIX%*-} \
--disable-shared \
--without-ncurses \
--cache-file=$BUILD_CACHE \
&& make ps/pscommand \
&& $STRIP ps/pscommand
WORKDIR $EXPORT_DIR
RUN cp $BUILD_DIR/ps/pscommand ps
FROM axisecp/acap-sdk:3.4.2-${ACAPARCH}-ubuntu20.04 as acap-sdk
FROM $BUILD_IMAGE as build
ARG ACAPARCH
# Copy over axparameter from the acap-sdk
COPY --from=acap-sdk /opt/axis/acapsdk/sysroots/${ACAPARCH}/usr/include/axsdk/ax_parameter /opt/axis/acapsdk/sysroots/${ACAPARCH}/usr/include/axsdk
COPY --from=acap-sdk /opt/axis/acapsdk/sysroots/${ACAPARCH}/usr/lib/libaxparameter.so /opt/axis/acapsdk/sysroots/${ACAPARCH}/usr/lib/libaxparameter.so
COPY --from=acap-sdk /opt/axis/acapsdk/sysroots/${ACAPARCH}/usr/lib/libaxparameter.so.1 /opt/axis/acapsdk/sysroots/${ACAPARCH}/usr/lib/libaxparameter.so.1
COPY --from=acap-sdk /opt/axis/acapsdk/sysroots/${ACAPARCH}/usr/lib/libaxparameter.so.1.0 /opt/axis/acapsdk/sysroots/${ACAPARCH}/usr/lib/libaxparameter.so.1.0
COPY --from=acap-sdk /opt/axis/acapsdk/sysroots/${ACAPARCH}/usr/lib/pkgconfig/axparameter.pc /opt/axis/acapsdk/sysroots/${ACAPARCH}/usr/lib/pkgconfig/axparameter.pc
COPY app /opt/app
COPY DOCKERVERSION /opt/app
COPY --from=ps /export/ps /opt/app
WORKDIR /opt/app
RUN . /opt/axis/acapsdk/environment-setup* && acap-build . -a dockerd -a docker-init -a docker-proxy -a empty_daemon.json -a ps
ENTRYPOINT [ "/opt/axis/acapsdk/sysroots/x86_64-pokysdk-linux/usr/bin/eap-install.sh" ]