-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
61 lines (52 loc) · 1.35 KB
/
Dockerfile
File metadata and controls
61 lines (52 loc) · 1.35 KB
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
61
FROM ubuntu:22.04
# Prevent interactive prompts during package installation
ENV DEBIAN_FRONTEND=noninteractive
# Set up build environment variables
ENV ANDROID_NDK_VERSION=r23
ENV ANDROID_NDK_HOME=/opt/android-ndk
ENV PATH="${ANDROID_NDK_HOME}/toolchains/llvm/prebuilt/linux-x86_64/bin:${PATH}"
# Install build dependencies
RUN apt-get update && apt-get install -y \
build-essential \
autoconf \
automake \
libtool \
pkg-config \
cmake \
ninja-build \
python3 \
python3-pip \
wget \
curl \
git \
unzip \
bison \
flex \
gperf \
texinfo \
help2man \
gawk \
libtool-bin \
libncurses5-dev \
libssl-dev \
libelf-dev \
bc \
rsync \
&& rm -rf /var/lib/apt/lists/*
# Install Python build tools
RUN pip3 install --no-cache-dir meson ninja
# Download and install Android NDK
RUN mkdir -p /opt && \
cd /opt && \
wget -q https://dl.google.com/android/repository/android-ndk-${ANDROID_NDK_VERSION}-linux.zip && \
unzip -q android-ndk-${ANDROID_NDK_VERSION}-linux.zip && \
mv android-ndk-${ANDROID_NDK_VERSION} android-ndk && \
rm android-ndk-${ANDROID_NDK_VERSION}-linux.zip
# Create workspace directory
WORKDIR /workspace
# Copy build system files
COPY . /workspace/
# Set up build environment
RUN chmod +x build.sh scripts/*.sh
# Default command
CMD ["/bin/bash"]