How to get OpenJdk on docker-seleniarm

57 views
Skip to first unread message

EuclidHeron

unread,
May 30, 2022, 5:58:39 PM5/30/22
to Selenium Users
Hi,

I need to run both selenium and OpenJdk. I have a current Dockerfile that does work on M1 Mac which as the ARM architecture, (below). But the JDK version that it uses is 11.0.14+9-post-Debian-1deb11u1:

FROM seleniarm/standalone-chromium:101.0.4951.41-chromedriver-101.0.4951.41-20220429
 ENV CHROMEDRIVER_PORT 4444
ENV CHROMEDRIVER_WHITELISTED_IPS "127.0.0.1"
ENV CHROMEDRIVER_URL_BASE ''
EXPOSE 4444
 EXPOSE 8080
EXPOSE 5005
ARG JAR_FILE=target/*.jar COPY ${JAR_FILE} app.jar ENTRYPOINT ["java","-jar", "-Xmx600m","/app.jar"]

Does anyone know how to get this to work with a given version of OpenJdk?

David

unread,
May 31, 2022, 1:39:18 PM5/31/22
to Selenium Users
Did you need to run a specific version of OpenJDK? Or are you running into some issues with v11.0.14?

FYI, unless you need to specifically test with ARM on the M1 Mac, say if you're just doing development testing and CPU architecture doesn't really matter, you can try to run to run AMD64 images instead of ARM images for the tests. Simpler to manage with a caveat of possibly slower execution compared to native ARM. I don't know if you need to do extra steps to use AMD64 over ARM if you use Docker Desktop, but there's some info for Podman: https://edofic.com/posts/2021-09-12-podman-m1-amd64/. With/after that setup, when you build and pull images, you just have to specify the image with CPU architecture prefix (e.g. amd64/image-name-path) to use the specific CPU architecture rather than let the framework determine and use the default native architecture. This would mean you can use the original selenium images rather than seleniarm.
Reply all
Reply to author
Forward
0 new messages