You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
ffmpeg-android-maker/tools/docker/Dockerfile

46 lines
1.7 KiB

FROM ubuntu:19.10
# Arguments that can be overridden in 'docker build' command:
# Versions of Android SDK, NDK and CMake
ARG VERSION_SDK=6200805
ARG VERSION_NDK=21.0.6113669
ARG VERSION_CMAKE=3.10.2.4988404
# The HOME variable isn't available for ENV directive (during building an image).
# So we define one manually. For alpine and ubuntu it should be '/root'
ARG HOME_TWIN=/root
# Creating mandatory environment variables
ENV ANDROID_SDK_HOME=${HOME_TWIN}/android-sdk
ENV ANDROID_NDK_HOME=${ANDROID_SDK_HOME}/ndk/${VERSION_NDK}
# Installing basic software
RUN apt-get update && apt-get install -y \
python3 python3-pip python3-setuptools python3-wheel ninja-build \
openjdk-8-jdk-headless \
curl \
unzip \
bash \
nasm \
pkg-config \
make
# Meson has to be installed in a different way
RUN pip3 install meson==0.53.2
# Download the Android SDK
RUN curl https://dl.google.com/android/repository/commandlinetools-linux-${VERSION_SDK}_latest.zip --output ${HOME_TWIN}/android-sdk.zip
# Unzip it and remove the archive
RUN mkdir -p ${HOME_TWIN}/android-sdk && \
unzip -qq ${HOME_TWIN}/android-sdk.zip -d ${HOME_TWIN}/android-sdk && \
rm ${HOME_TWIN}/android-sdk.zip
# Installing components through the Android SDK
RUN installAndroidComponent() { yes | ${ANDROID_SDK_HOME}/tools/bin/sdkmanager --sdk_root=${ANDROID_SDK_HOME} $1 > /dev/null; } && \
installAndroidComponent "ndk;${VERSION_NDK}" && \
installAndroidComponent "cmake;${VERSION_CMAKE}"
# The command to be executed when a container is running
# Passing additional arguments to the script is done via FAM_ARGS environment variable
CMD cd /mnt/ffmpeg-android-maker && ./ffmpeg-android-maker.sh ${FAM_ARGS}