appium / appium-docker-android

Appium Server setup to automate android testing on real devices
https://hub.docker.com/r/appium/
Other
605 stars 230 forks source link

JAVA_HOME ERROR #171

Open jsanchezalcala opened 2 months ago

jsanchezalcala commented 2 months ago

I've just cloned the repo , access to it with the terminal and run the command docker build -t "appium/appium:local" -f Appium/Dockerfile Appium

The error im getting is this one below Testing in mac

[``` +] Building 0.7s (11/17) docker:desktop-linux => [internal] load build definition from Dockerfile 0.0s => => transferring dockerfile: 5.22kB 0.0s => [internal] load metadata for docker.io/library/ubuntu:focal-20240530 0.5s => [internal] load .dockerignore 0.0s => => transferring context: 2B 0.0s => [ 1/13] FROM docker.io/library/ubuntu:focal-20240530@sha256:fa17826afb526a9fc7250e0fbcbfd18d03fe7a54849472f86879d8bf562c629e 0.0s => [internal] load build context 0.0s => => transferring context: 307B 0.0s => CACHED [ 2/13] RUN apt-get -qqy update && apt dist-upgrade -y && apt-get -qqy --no-install-recommends install ca-certificates curl gnupg libg 0.0s => CACHED [ 3/13] RUN echo "UTC" > /etc/timezone && dpkg-reconfigure --frontend noninteractive tzdata 0.0s => CACHED [ 4/13] RUN groupadd androidusr --gid 1301 && useradd androidusr --uid 1300 --gid 1301 --create-home --shell /b 0.0s => CACHED [ 5/13] WORKDIR /home/androidusr 0.0s => CACHED [ 6/13] RUN wget -O tools.zip https://dl.google.com/android/repository/commandlinetools-linux-8512546_latest.zip && unzip tools.zip && rm tools.zip && 0.0s => ERROR [ 7/13] RUN mkdir -p ~/.android && touch ~/.android/repositories.cfg && echo y | sdkmanager "platform-tools" && echo y | sdkmanager "build-tools;34 0.1s

[ 7/13] RUN mkdir -p ~/.android && touch ~/.android/repositories.cfg && echo y | sdkmanager "platform-tools" && echo y | sdkmanager "build-tools;34.0.0" && mv ~/.android .android && chown -R 1300:1301 .android: 0.080 0.080 ERROR: JAVA_HOME is set to an invalid directory: /usr/lib/jvm/java-11-openjdk-amd64 0.080 0.080 Please set the JAVA_HOME variable in your environment to match the 0.080 location of your Java installation. 0.080

3 warnings found (use --debug to expand):