Skip to content

Commit

Permalink
wip: update dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
mimani68 committed May 14, 2023
1 parent 8d5defc commit d1a8863
Show file tree
Hide file tree
Showing 2 changed files with 115 additions and 9 deletions.
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@

## What's in build-stage image?

- Alpine 3.7
- FFMPEG 4.0
- Golang 1.10
- OpenCV 4.0.1
- OpenCV 4.0.1 contrib packages required by GoCV
- Alpine 3.18
- FFMPEG 4.2
- Golang 1.20
- OpenCV 4.7.0
- OpenCV 4.7.0 contrib packages required by GoCV

## What's in runtime image?

- Alpine 3.7
- Alpine 3.18
- Whatever you need there

## Purpose
Expand All @@ -30,7 +30,7 @@ pushd runtime && docker build -t denismakogon/gocv-alpine:4.0.1-runtime .; popd
## Build the build-stage image

```bash
pushd build-stage && docker build -t denismakogon/gocv-alpine:4.0.1-buildstage .; popd
pushd build-stage && docker build -t denismakogon/gocv-alpine:4.7.0-buildstage .; popd
```

## Test sample:
Expand Down
110 changes: 108 additions & 2 deletions build-stage/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,114 @@
FROM denismakogon/ffmpeg-alpine:4.0-golang
FROM golang:1.20.4-alpine3.18

LABEL maintainer="Denis Makogon. mail: lildee1991@gmail.com"
LABEL maintainer="Mahdi Imani. <imani.mahdi@gmail.com>"

ENV OPENCV_VERSION=4.0.1
ENV FFMPEG_VERSION=4.2.9

ENV FFMPEG_CORE="bash \
tzdata \
libass \
libstdc++ \
libpng \
libjpeg \
xvidcore \
x264-libs \
x265 \
libvpx \
libvorbis \
opus \
lame \
fdk-aac \
freetype \
libressl \
jasper-libs \
libavc1394 \
yasm"

ENV RUNTIME_DEPS="coreutils \
make \
cmake \
gcc \
g++ \
clang \
linux-headers \
git \
curl"

ENV BUILD_DEPS="fdk-aac-dev \
freetype-dev \
x264-dev \
x265-dev \
yasm-dev \
libogg-dev \
libvorbis-dev \
opus-dev \
libvpx-dev \
lame-dev \
xvidcore-dev \
libass-dev \
libressl-dev \
musl-dev \
build-base \
libjpeg-turbo-dev \
libpng-dev \
jasper-dev \
libavc1394-dev \
libavc1394-dev \
clang-dev"

# FFMPEG
RUN apk update && \
apk add --no-cache apk-tools && \
echo http://nl.alpinelinux.org/alpine/edge/testing >> /etc/apk/repositories && \
apk update && \
apk add --no-cache --virtual .runtime-deps ${RUNTIME_DEPS} && \
apk add --no-cache ${FFMPEG_CORE} && \
apk add --no-cache --virtual .build-deps ${BUILD_DEPS} && \
export SRC=/usr \
DIR=$(mktemp -d) && cd ${DIR} && \
curl -Os http://ffmpeg.org/releases/ffmpeg-${FFMPEG_VERSION}.tar.gz && \
tar xzvf ffmpeg-${FFMPEG_VERSION}.tar.gz && \
cd ffmpeg-${FFMPEG_VERSION} && \
./configure \
--prefix="${SRC}" \
--extra-cflags="-I${SRC}/include" \
--extra-ldflags="-L${SRC}/lib" \
--bindir="${SRC}/bin" \
--extra-libs=-ldl \
--enable-version3 \
--enable-libmp3lame \
--enable-pthreads \
--enable-libx264 \
--enable-libxvid \
--enable-gpl \
--enable-postproc \
--enable-nonfree \
--enable-avresample \
--enable-libfdk-aac \
--disable-debug \
--enable-small \
--enable-libtls \
--enable-libx265 \
--enable-libopus \
--enable-libvorbis \
--enable-libvpx \
--enable-libfreetype \
--enable-libass \
--enable-shared \
--enable-pic && \
make && \
make install && \
make distclean && \
hash -r && \
cd /tmp && \
rm -rf ${DIR} && \
apk del .build-deps && \
apk del .runtime-deps && \
rm -rf /var/cache/apk/*


ENV OPENCV_VERSION=4.7.0
ENV BUILD="ca-certificates \
git \
build-base \
Expand Down

0 comments on commit d1a8863

Please sign in to comment.