-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
40 lines (33 loc) · 1.1 KB
/
Dockerfile
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
# syntax = docker/dockerfile:1.2
FROM ubuntu
# tz
ENV TZ=Etc/UTC
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
# package dependencies
RUN apt update -y --fix-missing; \
apt install -y \
wget gcc g++ automake autoconf libtool \
pkg-config make build-essential check
# arch flags
ARG BUILD_ROOT=/build
ARG ARCH_SCRIPT=$BUILD_ROOT/arch.sh
RUN mkdir $BUILD_ROOT
RUN echo 'test $(uname -i) = "aarch64" && echo -n "--build=aarch64-unknown-linux-gnu"' > $ARCH_SCRIPT
# libecap
ARG ECAP_BUILD_PATH=$BUILD_ROOT/ecap
RUN mkdir $ECAP_BUILD_PATH
WORKDIR $ECAP_BUILD_PATH
RUN wget https://www.e-cap.org/archive/libecap-1.0.0.tar.gz
RUN tar xvpfz libecap-1.0.0.tar.gz
WORKDIR $ECAP_BUILD_PATH/libecap-1.0.0
RUN ./configure `bash $ARCH_SCRIPT` && make && make install
RUN ldconfig
# ecap-stream
ARG ECAP_STREAM_BUILD_PATH=$BUILD_ROOT/ecap-stream
ENV ECAP_STREAM_BUILD_PATH=$ECAP_STREAM_BUILD_PATH
ADD . $ECAP_STREAM_BUILD_PATH
WORKDIR $ECAP_STREAM_BUILD_PATH
RUN bash bootstrap.sh
RUN ./configure && make && make install
RUN ldconfig
ENTRYPOINT cd $ECAP_STREAM_BUILD_PATH && make test