# Help using docker ephemeral slave agent for android

**URL:** <https://community.jenkins.io/t/help-using-docker-ephemeral-slave-agent-for-android/4061>\
**Category:** Using Jenkins\
**Tags:** question, docker\
**Created:** [October 4, 2022, 10:47am UTC](https://community.jenkins.io/t/help-using-docker-ephemeral-slave-agent-for-android/4061 "2022-10-04T10:47:58Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![gianpaolof](https://dub1.discourse-cdn.com/flex013/user_avatar/community.jenkins.io/gianpaolof/32/2427_2.png) [@gianpaolof](https://community.jenkins.io/u/gianpaolof)\
**Post date:** [October 4, 2022, 10:47am UTC](https://community.jenkins.io/t/help-using-docker-ephemeral-slave-agent-for-android/4061/1 "2022-10-04T10:47:58Z")

</div>

hello.  
i’m doing some experiments with jenkins and I’d like the idea of using dynamic slave agents for our android project. Does someone know if there is a docker image already available for that? I was following this [tutorial](https://devopscube.com/docker-containers-as-build-slaves-jenkins/) but I got this error:

Starting agent process: cd “/home/jenkins” && java -jar remoting.jar -workDir /home/jenkins -jar-cache /home/jenkins/remoting/jarCache  
Error: A JNI error has occurred, please check your installation and try again

Exception in thread “main” java.lang.UnsupportedClassVersionError: hudson/remoting/Launcher has been compiled by a more recent version of the Java Runtime (class file version 55.0), this version of the Java Runtime only recognizes class file versions up to 52.0

I think this is related to the jvm used in the docker image of the tutorial.

Cheers  
Gianpaolo

---

<div class="post-metadata">

**Author:** ![poddingue](https://dub1.discourse-cdn.com/flex013/user_avatar/community.jenkins.io/poddingue/32/985_2.png) [@poddingue](https://community.jenkins.io/u/poddingue)\
**Post date:** [October 12, 2022, 7:52am UTC](https://community.jenkins.io/t/help-using-docker-ephemeral-slave-agent-for-android/4061/2 "2022-10-12T07:52:37Z")

</div>

Hello and welcome to this community @gianpaolof 👋

You have to use the same version of Java on the agent and on the controller.  
Could you please check if that’s the case?  
Bytecode version 52.0 is JDK8, and 55.0 is JDK11.  
Please note that JDK8 is not supported anymore since Jenkins 2.357 and 2.361.1 LTS.  
If you need more recent Android Docker images, I have created quite a lot of them there: [Docker Hub](https://hub.docker.com/repository/docker/gounthar/jenkinsci-docker-android-base)

---

<div class="post-metadata">

**Author:** ![gianpaolof](https://dub1.discourse-cdn.com/flex013/user_avatar/community.jenkins.io/gianpaolof/32/2427_2.png) [@gianpaolof](https://community.jenkins.io/u/gianpaolof)\
**Post date:** [October 12, 2022, 3:43pm UTC](https://community.jenkins.io/t/help-using-docker-ephemeral-slave-agent-for-android/4061/3 "2022-10-12T15:43:51Z")

</div>

thanks, that was the case!  
since I’m here, did you also create images for ios slave?

---

<div class="post-metadata">

**Author:** ![poddingue](https://dub1.discourse-cdn.com/flex013/user_avatar/community.jenkins.io/poddingue/32/985_2.png) [@poddingue](https://community.jenkins.io/u/poddingue)\
**Post date:** [October 12, 2022, 4:32pm UTC](https://community.jenkins.io/t/help-using-docker-ephemeral-slave-agent-for-android/4061/4 "2022-10-12T16:32:32Z")

</div>

Thanks a lot for your feedback.

I will work on iOS builds with Jenkins in the coming months, but I’m not sure I will be able to produce a Docker image.  
I have several ideas in mind, one of them being using [docker-osx](https://computingforgeeks.com/run-macos-in-docker-using-docker-osx/).

---

<div class="post-metadata">

**Author:** ![gianpaolof](https://dub1.discourse-cdn.com/flex013/user_avatar/community.jenkins.io/gianpaolof/32/2427_2.png) [@gianpaolof](https://community.jenkins.io/u/gianpaolof)\
**Post date:** [October 12, 2022, 4:40pm UTC](https://community.jenkins.io/t/help-using-docker-ephemeral-slave-agent-for-android/4061/5 "2022-10-12T16:40:36Z")

</div>

welcome.

I see. From my first googling on github & c, having a slave docker for ios must be complicated. Thanks a lot for your reply 🙂

---

<div class="post-metadata">

**Author:** ![poddingue](https://dub1.discourse-cdn.com/flex013/user_avatar/community.jenkins.io/poddingue/32/985_2.png) [@poddingue](https://community.jenkins.io/u/poddingue)\
**Post date:** [October 12, 2022, 4:55pm UTC](https://community.jenkins.io/t/help-using-docker-ephemeral-slave-agent-for-android/4061/6 "2022-10-12T16:55:22Z")

</div>

You’re welcome too. 🤗

It’s more complicated than with Android, for sure, but it must be doable.  
Did you see the AWS [blog post](https://www.jenkins.io/blog/2022/10/03/scaling-out-iOS-builds-on-AWS-with-EC2-mac/) about iOS builds on Jenkins?

Do you have an Apple machine on your own, or do you only use Linux?

---

<div class="post-metadata">

**Author:** ![gianpaolof](https://dub1.discourse-cdn.com/flex013/user_avatar/community.jenkins.io/gianpaolof/32/2427_2.png) [@gianpaolof](https://community.jenkins.io/u/gianpaolof)\
**Post date:** [October 12, 2022, 5:18pm UTC](https://community.jenkins.io/t/help-using-docker-ephemeral-slave-agent-for-android/4061/7 "2022-10-12T17:18:47Z")

</div>

So far we have used a mac mini with fastlane to build both ios and android.  
Then, since we have our own cloud, I created an Ubuntu VM and started experimenting with Jenkins controller left on the mac mini and the slave on the ubuntu.  
One thing not clear: I thought apple hardware was mandatory tobuild ios, is that true?

Did not see thatblog post, thanks

---

<div class="post-metadata">

**Author:** ![poddingue](https://dub1.discourse-cdn.com/flex013/user_avatar/community.jenkins.io/poddingue/32/985_2.png) [@poddingue](https://community.jenkins.io/u/poddingue)\
**Post date:** [October 12, 2022, 7:04pm UTC](https://community.jenkins.io/t/help-using-docker-ephemeral-slave-agent-for-android/4061/8 "2022-10-12T19:04:05Z")

</div>

As far as I know, it’s legally mandatory to have Apple hardware to build iOS/macOS apps.  
Technically speaking, not, it’s not mandatory.

---

<div class="post-metadata">

**Author:** ![gianpaolof](https://dub1.discourse-cdn.com/flex013/user_avatar/community.jenkins.io/gianpaolof/32/2427_2.png) [@gianpaolof](https://community.jenkins.io/u/gianpaolof)\
**Post date:** [October 12, 2022, 7:37pm UTC](https://community.jenkins.io/t/help-using-docker-ephemeral-slave-agent-for-android/4061/9 "2022-10-12T19:37:19Z")

</div>

Ah! That’s interesting. I’m not a ios dev so I never dig into it, I thought that building and signing ipa were all depending on real mac h/w. U never stop learning 😃
