-
Notifications
You must be signed in to change notification settings - Fork 19
/
Dockerfile
57 lines (47 loc) · 1.53 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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
##################################################
# Build layer
##################################################
FROM debian:latest as build
WORKDIR /build
# Install build dependencies
RUN DEBIAN_FRONTEND=noninteractive \
apt-get update -y && \
apt-get install -y \
git \
pkg-config \
g++ \
gcc \
cmake \
uuid-dev \
liburiparser-dev \
libexpat1-dev \
libcurl4-openssl-dev
# Copy, configure and make install
COPY . bmx
ARG CONFIG_ARGS='-DBMX_BUILD_WITH_LIBCURL=ON -DLIBMXF_BUILD_ARCHIVE=ON'
RUN mkdir build && cd build && \
cmake -G "Unix Makefiles" \
-DCMAKE_INSTALL_PREFIX=/build/install \
$CONFIG_ARGS \
../bmx && \
make && make test && make install
##################################################
# Runtime layer
##################################################
FROM debian:latest as runtime
LABEL org.opencontainers.image.source=https://github.com/bbc/bmx
LABEL org.opencontainers.image.description="A useful set of tools for handling MXF and related files"
LABEL org.opencontainers.image.licenses=BSD-3-Clause
# Install runtime dependencies
RUN DEBIAN_FRONTEND=noninteractive \
apt-get update -y && \
apt-get install -y \
uuid-dev \
liburiparser-dev \
libexpat1-dev \
libcurl4-openssl-dev
# Copy build artefacts and update the runtime linker cache with those artefacts
COPY --from=build /build/install/ /usr/local/
RUN /sbin/ldconfig
COPY docker/tool_list.txt /
CMD [ "cat", "/tool_list.txt" ]