Skip to content

Commit 105b7b8

Browse files
committed
Revert "Make JAVA_HOME platform independent"
This reverts commit 70f18be.
1 parent d821b51 commit 105b7b8

File tree

2 files changed

+4
-8
lines changed

2 files changed

+4
-8
lines changed

README.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -118,10 +118,9 @@ More information about **storage driver**:
118118
```bash
119119
# build the image
120120
# set the working directory to the project's root directory first
121-
# replace `<amd64|arm64>` with your desired platform
122-
docker build --build-arg PLATFORM=<amd64|arm64> -t android-sdk android-sdk
121+
docker build -t android-sdk android-sdk
123122
# or you can also pass specific tool version as you wish (optional, while there is default version)
124-
docker build --build-arg PLATFORM=<platform_name> --build-arg JDK_VERSION=<jdk_version> --build-arg GRADLE_VERSION=<gradle_version> --build-arg KOTLIN_VERSION=<kotlin_version> --build-arg ANDROID_SDK_VERSION=<android_sdk_version> -t android-sdk android-sdk
123+
docker build --build-arg JDK_VERSION=<jdk_version> --build-arg GRADLE_VERSION=<gradle_version> --build-arg KOTLIN_VERSION=<kotlin_version> --build-arg ANDROID_SDK_VERSION=<android_sdk_version> -t android-sdk android-sdk
125124
# or pull the image instead of building on your own
126125
docker pull thyrlian/android-sdk
127126

@@ -172,7 +171,7 @@ It is also possible if you wanna connect to container via SSH. There are three
172171
# Put your `id_rsa.pub` under `android-sdk/accredited_keys` directory (as many as you want)
173172

174173
# Build an image, then an `authorized_keys` file will be composed automatically, based on the keys from `android-sdk/accredited_keys` directory
175-
docker build --build-arg PLATFORM=<platform_name> -t android-sdk android-sdk
174+
docker build -t android-sdk android-sdk
176175

177176
# Run a container
178177
docker run -d -p 2222:22 -v $(pwd)/sdk:/opt/android-sdk:ro android-sdk

android-sdk/Dockerfile

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,6 @@ FROM ubuntu:22.04
1010
# ---------------------------------------------------------------------- #
1111
LABEL maintainer "thyrlian@gmail.com"
1212

13-
# set PLATFORM with available values for building the image: 'amd64' or 'arm64'
14-
ARG PLATFORM=amd64
15-
1613
# support multiarch: i386 architecture
1714
# install Java
1815
# install essential tools
@@ -54,7 +51,7 @@ RUN mkdir -p ${ANDROID_HOME}/cmdline-tools && \
5451
rm *tools*linux*.zip
5552

5653
# set the environment variables
57-
ENV JAVA_HOME /usr/lib/jvm/java-${JDK_VERSION}-openjdk-${PLATFORM}
54+
ENV JAVA_HOME /usr/lib/jvm/java-${JDK_VERSION}-openjdk-amd64
5855
ENV GRADLE_HOME /opt/gradle
5956
ENV KOTLIN_HOME /opt/kotlinc
6057
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

0 commit comments

Comments
 (0)