From 3e85cb0adcab1e8df816157fe1c48dda3e81d56f Mon Sep 17 00:00:00 2001 From: Alexander Mahr Date: Sun, 2 Jul 2023 13:32:08 +0200 Subject: [PATCH] start repo for being able to build an app --- .bashrc | 1 + Dockerfile | 23 +++++++++++++++++++++++ docker-compose.yml | 7 +++++++ 3 files changed, 31 insertions(+) create mode 100644 .bashrc create mode 100644 Dockerfile create mode 100644 docker-compose.yml diff --git a/.bashrc b/.bashrc new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/.bashrc @@ -0,0 +1 @@ + diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..907b5e1 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,23 @@ +FROM alpine:latest + +RUN apk update +RUN apk add coreutils bash shadow make zip +RUN apk add openjdk11-jdk +ENV ANDROID_SDK_ROOT="/opt/android" +ENV BUILD_TOOLS_LATEST="$ANDROID_SDK_ROOT/cmdline-tools/latest" +RUN BUILD_TOOLS="$(realpath -m "$BUILD_TOOLS_LATEST/..")";\ + mkdir -p "$BUILD_TOOLS";\ + cd "$BUILD_TOOLS";\ + pwd;\ + wget -O cmdline-tools.zip https://dl.google.com/android/repository/commandlinetools-linux-9477386_latest.zip;\ + unzip cmdline-tools.zip;\ + ls ;\ + ls cmdline-tools;\ + rm cmdline-tools.zip;\ + mv -v cmdline-tools "$BUILD_TOOLS_LATEST" || true +ENV PATH="$PATH:$BUILD_TOOLS_LATEST/bin" +ENV LIBRARY_PATH="$LIBRARY_PATH:$BUILD_TOOLS_LATEST/lib" + +RUN yes | sdkmanager --install "build-tools;33.0.2" +RUN yes | sdkmanager --install "plattforms:33" +RUN useradd -m -s /bin/bash app diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..8702390 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,7 @@ +version: "3.9" +services: + app-compiler: + build: + context: . + stop_grace_period: 1s + entrypoint: sh -c 'sleep infinity'