FIJK dockerfile 编译环境
FROM --platform=linux/amd64 ubuntu:18.04
RUN apt-get update && apt-get install -y \
wget \
unzip \
git \
gcc \
g++ \
make \
python \
yasm \
pkg-config \
protobuf-compiler \
sudo
RUN apt-get install -y openjdk-8-jdk
ENV ANDROID_HOME=/opt/android-sdk-linux
ENV PATH=$PATH:$ANDROID_HOME/tools/bin:$ANDROID_HOME/platform-tools
RUN wget --quiet --output-document=android-sdk.zip https://dl.google.com/android/repository/sdk-tools-linux-4333796.zip \
&& unzip -d $ANDROID_HOME android-sdk.zip \
&& rm android-sdk.zip
RUN wget --quiet --output-document=command-line.zip https://dl.google.com/android/repository/commandlinetools-linux-10406996_latest.zip \
&& unzip -d $ANDROID_HOME command-line.zip \
&& rm command-line.zip
ENV PATH=$PATH:$ANDROID_HOME/cmdline-tools/bin
RUN echo 'y' | sudo $ANDROID_HOME/tools/bin/sdkmanager "platform-tools" "platforms;android-26" "tools"
RUN echo "no" | sudo dpkg-reconfigure dash
RUN mkdir -p $ANDROID_HOME/ndk
RUN wget --quiet --output-document=ndk-r16b-linux-x86_6.zip https://dl.google.com/android/repository/android-ndk-r10e-linux-x86_64.zip \
&& unzip -d $ANDROID_HOME/ndk ndk-r10e-linux-x86_6.zip \
&& rm ndk-r10e-linux-x86_6.zip
# RUN mkdir -p $ANDROID_HOME/cmake
# RUN wget --quiet --output-document=cmake3102.tar https://cmake.org/files/v3.10/cmake-3.10.2.tar.gz \
# && tar -xvf cmake3102.tar \
# && mv cmake-3.10.2 3.10.2.4988404 \
# && cd 3.10.2.4988404 && ./configure && sudo make \
# && sudo make install \
# && cd .. \
# && mv 3.10.2.4988404 $ANDROID_HOME/cmake/ \
# && rm cmake3102.tar
RUN echo 'y' | sudo $ANDROID_HOME/tools/bin/sdkmanager "ndk;16.1.4479499" "cmake;3.10.2.4988404"
ENV PATH=$PATH:$ANDROID_HOME/cmake/3.10.2.4988404/bin/
# recommend use ndk 10
ENV ANDROID_NDK=$ANDROID_HOME/ndk/android-ndk-r10e/
# ENV ANDROID_NDK=$ANDROID_HOME/ndk/16.1.4479499/
# RUN comman shell
# docker build -f Dockerfile -t fijkplayer:android_ok .
# docker run --platform linux/amd64 -v /Users/blake/work/Kami/kcode/zkcam/ijkplayer-android:/ijkplayer -it fijkplayer:android_ok /bin/bash
- 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
- 58
- 59
- 60
build shell
#! /usr/bin/env bash
cd ./contrib
./compile-x264.sh all
./compile-openssl.sh all
./compile-ffmpeg.sh clean && ./compile-ffmpeg.sh all
cd ..
./compile-ijk.sh clean && ./compile-ijk.sh all
cd ./ijkplayer
./gradlew :fijkplayer-full:clean && ./gradlew :fijkplayer-full:assembleRelease
update ffmpeg for multi-arch shell
#! /usr/bin/env bash
cd ./ffmpeg-armv7a
git format-patch HEAD~
cd ../ffmpeg-arm64
git am --signoff < ../ffmpeg-armv7a/000*
cd ../ffmpeg-x86
git am --signoff < ../ffmpeg-armv7a/000*
cd ../ffmpeg-x86_64
git am --signoff < ../ffmpeg-armv7a/000*