Files
base/Dockerfile
T
Cédric Verstraeten 977706d67d Update Dockerfile
2022-07-19 10:12:58 +02:00

51 lines
2.0 KiB
Docker

FROM debian:bullseye
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 supervisor nasm \
zlib1g-dev tar libx264. unzip wget pkg-config libavresample-dev
#################################
# Clone and build FFMpeg & OpenCV
RUN git clone https://github.com/FFmpeg/FFmpeg && \
cd FFmpeg && git checkout n4.4.1 && \
./configure --prefix=/usr/local --target-os=linux --enable-nonfree --enable-avfilter --enable-avresample --enable-libx264 --enable-gpl --enable-shared --extra-libs=-latomic && \
make -j8 && \
make install && \
cd .. && rm -rf FFmpeg
RUN wget -O opencv.zip https://github.com/opencv/opencv/archive/4.5.5.zip && \
unzip opencv.zip && mv opencv-4.5.5 opencv && cd opencv && mkdir build && cd build && \
cmake -D CMAKE_BUILD_TYPE=RELEASE \
-D CMAKE_INSTALL_PREFIX=/usr/ \
-D OPENCV_GENERATE_PKGCONFIG=YES \
-D BUILD_TESTS=OFF \
-D OPENCV_ENABLE_NONFREE=ON \
#-D BUILD_opencv_dnn=OFF \
-D BUILD_opencv_ml=OFF \
-D BUILD_opencv_stitching=OFF \
-D BUILD_opencv_ts=OFF \
-D BUILD_opencv_java_bindings_generator=OFF \
-D BUILD_opencv_python_bindings_generator=OFF \
-D INSTALL_PYTHON_EXAMPLES=OFF \
-D BUILD_EXAMPLES=OFF .. && make -j8 && make install && cd ../.. && rm -rf opencv*
############################
# 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.18.linux-$ARCH.tar.gz" && \
tar -xvf "go1.18.linux-$ARCH.tar.gz" && \
rm -rf go1.18.linux-$ARCH.tar.gz && \
mv go /usr/local