Common Android application building environment with Docker.
Download an image. Tag gradle4.1-jdk8-27-27.0.0 means this image contains
gradle 4.1, JDK 8, Android version 27, Android build tools version 27.0.0.
docker pull jerray/android-builder:gradle4.1-jdk8-27-27.0.0
Chnage current directory to your project source root directory. Run following command to start testing.
docker run --rm -it \
-v $PWD:/src \
-v $HOME/.gradle:/home/gradle/.gradle \
jerray/android-builder:gradle4.1-jdk8-27-27.0.0 \
gradle test
Replace gradle test command to any other you want gradle to run.
For example I use gradle assembleRelease command to build the apk release package.
Parameter -v $HOME/.gradle:/home/gradle/.gradle is used to share gradle cache between
host machine and docker container. Removing it will results in gradle downloading depedencies
every time.
Feel free to make pull requests to add different tool versions. I will merge the pull requests and make the image available on DockerHub as soon as possible.
Content type
Image
Digest
Size
525.3 MB
Last updated
over 6 years ago
docker pull jerray/android-builder:gradle5.6.4-jdk8-27-28.0.3