Public | Automated Build

Last pushed: 2 months ago
Short Description
This docker is to build Android Gradle project with Java 7.
Full Description


DEPRECATED use java7-8

This docker is to build Android Gradle project with Java 7.
It is available on Docker Hub .


  • Android SDK: r24.3.3
  • Build tools: 21, 21.0.1, 21.0.2, 21.1, 21.1.1, 21.1.2, 22, 22.0.1
  • Android API: 21, 22
  • Support maven repository
  • Google maven repository
  • Arm emulator: v21
  • Platform tools
  • Created emulator image named: "Nexus 5"

Build image

docker build -t jacekmarchwicki/android .

If building fail you can debug via where 1b372b1f76f2 is partial build

docker run --tty --interactive --rm 1b372b1f76f2 /bin/bash

Push build version to repository

docker push jacekmarchwicki/android:java7


Change directory to your project directory, than run:

docker run --tty --interactive --volume=$(pwd):/opt/workspace --workdir=/opt/workspace --rm jacekmarchwicki/android:java7  /bin/sh -c "./gradlew build"
Docker Pull Command
Source Repository

Comments (9)
4 months ago

Can you point me how to create my own image with my Build Env. Would like to create my own env.

5 months ago

For any issues please look on github

5 months ago

How can I run this container on a no-gui machine, and connect it via sth like VNC?

a year ago

I'm using this image for Gitlab CI build. That console output tells me: "failed to find target with hash string 'android-23' in: /opt/android-sdk-linux".

But according to the description, this version should be included?
Same counts for Build tools 23.0.3

2 years ago

@thaniyarasu you probably need to put --no-ui to your command

in some dockers on ci we install some application additionally via:
/opt/tools/ "android update sdk --all --no-ui --filter \"build-tools-22.0.0, extra-android-support, extra-android-m2repository, extra-google-google_play_services, extra-google-m2repository\"

2 years ago

if you do "android update" inside docker file then it will raise that error.
but if you run the same "android update" inside docker live container then it won't raise error.

2 years ago

This issue "Filed to rename directory" is related to
Actually I do not recall but on one of docker file system this might happen afs or bfs.
But you have everything installed on this docker so you do not have to update sdk.
If you would like to have more tools just create a fork and push new build to docker hub so you will not install tool in each build.

2 years ago

getting the same error
Failed to rename directory /opt/android-sdk-linux/tools to /usr/local/android-sdk-linux/temp/ToolPackage.old01.
Failed to create directory /opt/android-sdk-linux/tools

2 years ago

When installing tools following happens:
Failed to rename directory /opt/android-sdk-linux/tools to /opt/android-sdk-linux/temp/ToolPackage.old01. Failed to create directory /opt/android-sdk-linux/tools