Adding Dockerfile to allow building using Docker.

pull/21/head
Andrew Killer 5 years ago
parent d668263faf
commit eafe97a29d
  1. 1
      .gitattributes
  2. 50
      Dockerfile
  3. 21
      README.md

1
.gitattributes vendored

@ -0,0 +1 @@
*.sh text eol=lf

@ -0,0 +1,50 @@
FROM ubuntu:18.04
ARG DEBIAN_FRONTEND=noninteractive
ARG CMAKE_VERSION=3.10.2.4988404
ARG NDK_VERSION=21.0.6113669
ARG SDK_VERSION=6200805
ARG ANDROID_API_LEVEL=29
WORKDIR /build
RUN apt-get update && \
apt-get install -y \
autoconf \
automake \
build-essential \
curl \
default-jdk \
git-core \
libass-dev \
libfreetype6-dev \
libsdl2-dev \
libtool \
libva-dev \
libvdpau-dev \
libvorbis-dev \
libxcb1-dev \
libxcb-shm0-dev \
libxcb-xfixes0-dev \
pkg-config \
texinfo \
unzip \
wget \
zlib1g-dev && \
rm -rf /var/lib/apt/lists/*
ENV ANDROID_SDK_HOME=/opt/android-sdk
ENV ANDROID_NDK_HOME=/opt/android-sdk/ndk/${NDK_VERSION}
RUN wget -q "https://dl.google.com/android/repository/commandlinetools-linux-${SDK_VERSION}_latest.zip" -P /tmp && \
unzip -q -d /opt/android-sdk /tmp/commandlinetools-linux-${SDK_VERSION}_latest.zip && \
yes Y | ${ANDROID_SDK_HOME}/tools/bin/sdkmanager --sdk_root=${ANDROID_SDK_HOME} --licenses >/dev/null && \
yes Y | ${ANDROID_SDK_HOME}/tools/bin/sdkmanager --sdk_root=${ANDROID_SDK_HOME} --install "platform-tools" "platforms;android-${ANDROID_API_LEVEL}" "ndk;${NDK_VERSION}" "cmake;${CMAKE_VERSION}" && \
rm /tmp/commandlinetools-*.zip
COPY scripts ./scripts
COPY sources ./sources
COPY ffmpeg-android-maker.sh ./
RUN chmod +x ./ffmpeg-android-maker.sh
ENTRYPOINT ["./ffmpeg-android-maker.sh"]

@ -34,7 +34,26 @@ On **macOS** or **Linux** just execute the script in terminal.
~~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.~~
Since v2.0.0 the **Windows** support is temporary absent.
Since v2.0.0 **Windows** support is temporary absent, however you can still bulid using [Docker](#docker).
### Docker
Docker can be used to build the project without the need to install any build dependencies and also enables build support on Windows.
The build output is copied to /build/build. This should be mounted to a folder on the host machine to access.
1. Build the image. You only need to do this once unless you need to change SDK/NDK versions:
```sh
docker build --rm --tag ffmpeg-android-maker:latest .
```
2. Run the container. This will download ffmpeg, build it, then copy to /build/build:
```sh
docker container run --rm --name ffmpeg-android-maker -v /path/to/host/output:/build/build ffmpeg-android-maker
```
On Windows you can pass in a host path in the following way:
```
-v C:\path\to\host\output:/build/build
```
## Prerequisites

Loading…
Cancel
Save