Skip to content

Commit 052a7f1

Browse files
committed
Docker integration
1 parent 0e85ea9 commit 052a7f1

File tree

2 files changed

+49
-1
lines changed

2 files changed

+49
-1
lines changed

README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,10 @@ On **macOS** or **Linux** just execute the ffmpeg-android-maker.sh script in ter
4242

4343
~~It is also possible to execute this script on a **Windows** machine with [MSYS2](https://www.msys2.org). You also need to install specific packages to it: *make*, *git*, *diffutils* and *tar*. The script supports both 32-bit and 64-bit versions of Windows. Also see Prerequisites section for necessary software.~~
4444

45-
Since v2.0.0 the **Windows** support is temporary absent, but soon a Docker image will be available to be used on any host OS.
45+
Since v2.0.0 the MSYS2 support is temporary absent.
46+
47+
Since v2.1.1 the **Windows** support is done with [Docker](https://www.docker.com) tool.
48+
Check [this WIKI page](https://github.com/Javernaut/ffmpeg-android-maker/wiki/Docker-support) for more info.
4649

4750
## Requirements
4851

tools/docker/Dockerfile

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
FROM ubuntu:19.10
2+
3+
# Arguments that can be overridden in 'docker build' command:
4+
# Versions of Android SDK, NDK and CMake
5+
ARG VERSION_SDK=6200805
6+
ARG VERSION_NDK=21.0.6113669
7+
ARG VERSION_CMAKE=3.10.2.4988404
8+
9+
# The HOME variable isn't available for ENV directive (during building an image).
10+
# So we define one manually. For alpine and ubuntu it should be '/root'
11+
ARG HOME_TWIN=/root
12+
13+
# Creating mandatory environment variables
14+
ENV ANDROID_SDK_HOME=${HOME_TWIN}/android-sdk
15+
ENV ANDROID_NDK_HOME=${ANDROID_SDK_HOME}/ndk/${VERSION_NDK}
16+
17+
# Installing basic software
18+
RUN apt-get update && apt-get install -y \
19+
python3 python3-pip python3-setuptools python3-wheel ninja-build \
20+
openjdk-8-jdk-headless \
21+
curl \
22+
unzip \
23+
bash \
24+
nasm \
25+
pkg-config \
26+
make
27+
28+
# Meson has to be installed in a different way
29+
RUN pip3 install meson==0.53.2
30+
31+
# Download the Android SDK
32+
RUN curl https://dl.google.com/android/repository/commandlinetools-linux-${VERSION_SDK}_latest.zip --output ${HOME_TWIN}/android-sdk.zip
33+
# Unzip it and remove the archive
34+
RUN mkdir -p ${HOME_TWIN}/android-sdk && \
35+
unzip -qq ${HOME_TWIN}/android-sdk.zip -d ${HOME_TWIN}/android-sdk && \
36+
rm ${HOME_TWIN}/android-sdk.zip
37+
38+
# Installing components through the Android SDK
39+
RUN installAndroidComponent() { yes | ${ANDROID_SDK_HOME}/tools/bin/sdkmanager --sdk_root=${ANDROID_SDK_HOME} $1 > /dev/null; } && \
40+
installAndroidComponent "ndk;${VERSION_NDK}" && \
41+
installAndroidComponent "cmake;${VERSION_CMAKE}"
42+
43+
# The command to be executed when a container is running
44+
# Passing additional arguments to the script is done via FAM_ARGS environment variable
45+
CMD cd /mnt/ffmpeg-android-maker && ./ffmpeg-android-maker.sh ${FAM_ARGS}

0 commit comments

Comments
 (0)