-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
49 lines (41 loc) · 1.65 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
FROM debian:bullseye AS builder
LABEL Author=Kerberos.io
RUN apt-get update && apt-get upgrade -y && apt-get install -y wget build-essential \
cmake libc-ares-dev uuid-dev daemon libwebsockets-dev git \
cmake wget dh-autoreconf autotools-dev autoconf automake gcc \
build-essential libtool make ca-certificates nasm tar unzip wget pkg-config curl
#############################
# Static build x264
RUN git clone https://code.videolan.org/videolan/x264.git && \
cd x264 && git checkout 0a84d986 && \
./configure --prefix=/usr/local --enable-static --enable-pic && \
make -j8 && \
make install && \
cd .. && rm -rf x264
#################################
# Clone and build FFMpeg & OpenCV
RUN git clone https://github.com/FFmpeg/FFmpeg && \
cd FFmpeg && git checkout n6.0.1 && \
./configure --prefix=/usr/local --target-os=linux --enable-nonfree \
--extra-ldflags="-latomic" \
--enable-avfilter \
--disable-zlib \
--enable-gpl \
--extra-libs=-latomic \
--enable-static --disable-shared && \
make -j8 && \
make install && \
cd .. && rm -rf FFmpeg
############################
# Build Golang
ENV GOROOT=/usr/local/go
ENV GOPATH=/go
ENV PATH=$GOPATH/bin:$GOROOT/bin:$PATH
RUN ARCH=$(uname -m) && \
ARCH=$([ "$(uname -m)" = "armv7l" ] && echo "armv6l" || echo $ARCH) && \
ARCH=$([ "$(uname -m)" = "x86_64" ] && echo "amd64" || echo $ARCH) && \
ARCH=$([ "$(uname -m)" = "aarch64" ] && echo "arm64" || echo $ARCH) && \
wget "https://dl.google.com/go/go1.23.1.linux-$ARCH.tar.gz" && \
tar -xvf "go1.23.1.linux-$ARCH.tar.gz" && \
rm -rf go1.23.1.linux-$ARCH.tar.gz && \
mv go /usr/local