-
Notifications
You must be signed in to change notification settings - Fork 2
/
Dockerfile
31 lines (26 loc) · 1003 Bytes
/
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
# recommended way to build is using:
# docker build \
# --build-arg PLATFORM=linux --build-arg ARCH=amd64 --build-arg VERSION=focal \
# -f etc/docker/Dockerfile .
#
# ${VERSION} should be "focal"
ARG PLATFORM
ARG ARCH
ARG VERSION
FROM --platform=${PLATFORM}/${ARCH} ubuntu:${VERSION} AS builder
# update the base packages
ENV DEBIAN_FRONTEND="noninteractive" TZ="Europe/Berlin"
RUN apt-get update -y && apt-get upgrade -y
# install packages
RUN apt-get install -y apt-utils golang make pkg-config ca-certificates lsb-release software-properties-common
# install other build dependencies
# note we need to install ffmpeg 4 from a different repo for bionic
RUN apt-get install -y \
libavcodec-dev libavdevice-dev libavfilter-dev \
libavformat-dev libswresample-dev libavutil-dev libchromaprint-dev
# Run makefile to build command-line tools
WORKDIR /usr/src/app
COPY . .
RUN make
FROM --platform=${PLATFORM}/${ARCH} ubuntu:${VERSION}
COPY --from=builder /usr/src/app/build/* /usr/local/bin/