|
|
|
FROM openjdk:11-jdk-slim |
|
|
|
|
|
WORKDIR /app |
|
|
|
|
|
RUN apt-get update && apt-get install -y \ |
|
wget \ |
|
unzip \ |
|
git \ |
|
&& rm -rf /var/lib/apt/lists/* |
|
|
|
|
|
ENV ANDROID_SDK_ROOT /sdk |
|
RUN mkdir -p /sdk && \ |
|
wget -q "https://dl.google.com/android/repository/commandlinetools-linux-9477386_latest.zip" -O cmdline-tools.zip && \ |
|
unzip cmdline-tools.zip -d /sdk/cmdline-tools && \ |
|
rm cmdline-tools.zip && \ |
|
mkdir -p /sdk/cmdline-tools/latest && \ |
|
mv /sdk/cmdline-tools/* /sdk/cmdline-tools/latest && \ |
|
yes | /sdk/cmdline-tools/latest/bin/sdkmanager --licenses && \ |
|
/sdk/cmdline-tools/latest/bin/sdkmanager \ |
|
"platform-tools" \ |
|
"platforms;android-33" \ |
|
"build-tools;33.0.2" |
|
|
|
|
|
ENV PATH $PATH:/sdk/platform-tools:/sdk/build-tools/33.0.2 |
|
|
|
|
|
RUN wget -q "https://services.gradle.org/distributions/gradle-7.6-bin.zip" -O gradle.zip && \ |
|
unzip gradle.zip -d /opt/ && \ |
|
rm gradle.zip |
|
ENV PATH $PATH:/opt/gradle-7.6/bin |
|
|
|
|
|
COPY . /app |
|
|
|
|
|
RUN git clone https://github.com/guardianproject/NetCipher.git /netcipher && \ |
|
cd /netcipher && \ |
|
./gradlew build && \ |
|
mkdir -p /app/app/libs && \ |
|
cp /netcipher/netcipher/build/libs/netcipher.jar /app/app/libs/ |
|
|
|
|
|
RUN ./gradlew clean build --refresh-dependencies --stacktrace |
|
|