diff --git a/README.md b/README.md index 937ba1b..82df629 100644 --- a/README.md +++ b/README.md @@ -118,10 +118,9 @@ More information about **storage driver**: ```bash # build the image # set the working directory to the project's root directory first -# replace `` with your desired platform -docker build --build-arg PLATFORM= -t android-sdk android-sdk +docker build -t android-sdk android-sdk # or you can also pass specific tool version as you wish (optional, while there is default version) -docker build --build-arg PLATFORM= --build-arg JDK_VERSION= --build-arg GRADLE_VERSION= --build-arg KOTLIN_VERSION= --build-arg ANDROID_SDK_VERSION= -t android-sdk android-sdk +docker build --build-arg JDK_VERSION= --build-arg GRADLE_VERSION= --build-arg KOTLIN_VERSION= --build-arg ANDROID_SDK_VERSION= -t android-sdk android-sdk # or pull the image instead of building on your own docker pull thyrlian/android-sdk @@ -172,7 +171,7 @@ It is also possible if you wanna connect to container via SSH. There are three # Put your `id_rsa.pub` under `android-sdk/accredited_keys` directory (as many as you want) # Build an image, then an `authorized_keys` file will be composed automatically, based on the keys from `android-sdk/accredited_keys` directory - docker build --build-arg PLATFORM= -t android-sdk android-sdk + docker build -t android-sdk android-sdk # Run a container docker run -d -p 2222:22 -v $(pwd)/sdk:/opt/android-sdk:ro android-sdk diff --git a/android-sdk/Dockerfile b/android-sdk/Dockerfile index 71d49da..fdab7c3 100644 --- a/android-sdk/Dockerfile +++ b/android-sdk/Dockerfile @@ -10,9 +10,6 @@ FROM ubuntu:22.04 # ---------------------------------------------------------------------- # LABEL maintainer "thyrlian@gmail.com" -# set PLATFORM with available values for building the image: 'amd64' or 'arm64' -ARG PLATFORM=amd64 - # support multiarch: i386 architecture # install Java # install essential tools @@ -54,7 +51,7 @@ RUN mkdir -p ${ANDROID_HOME}/cmdline-tools && \ rm *tools*linux*.zip # set the environment variables -ENV JAVA_HOME /usr/lib/jvm/java-${JDK_VERSION}-openjdk-${PLATFORM} +ENV JAVA_HOME /usr/lib/jvm/java-${JDK_VERSION}-openjdk-amd64 ENV GRADLE_HOME /opt/gradle ENV KOTLIN_HOME /opt/kotlinc ENV PATH ${PATH}:${GRADLE_HOME}/bin:${KOTLIN_HOME}/bin:${ANDROID_HOME}/cmdline-tools/latest/bin:${ANDROID_HOME}/cmdline-tools/tools/bin:${ANDROID_HOME}/platform-tools:${ANDROID_HOME}/emulator