This image has been deprecated and no updates (or support) may be available in future. Even though it is a container, it may or may not keep working as expected, use at your own risk.
Container for Alpine Linux + OpenJDK8 + Android + NodeJS + Cordova
This image containerizes the Android command-line tools, along with Gradle and OpenJDK-8 for building native apps, as well as Cordova for building hybrid projects, with its NPM dependencies.
latest tag is retagged from x86_64, so pulling without any tag fetches you that image. For any other architectures specify the tag for that architecture. e.g. for armv8 or aarch64 host it is alpine-android:aarch64.
Mount the project directory (where build.gradle or package.json is) at /home/alpine/project. Mounts PWD by default.
Builds run under the user alpine.
Optionally, if you want to cache the jars/packages downloaded by gradle, so that they're downloaded once, and reused in later builds, bind mount the user home directory (/home/alpine) somewhere in your local. The packages get cached inside the /home/alpine/.gradle folder.
Feel free to clone (or fork) the repository and customize it for your own usage, build the image for yourself on your own systems, and optionally, push it to your own public (or private) repository.
Before we clone the /repository, we must have Git, GNU make, and Docker (optionally, with buildx plugin for multi-platform images) setup on the machine. Also, for multi-platform annotations, we might require enabling experimental features of Docker.
Running the image creates a container and either starts a service (for service images) or provides a shell (can be either a root-shell or usershell) to execute commands in, depending on the image. We can run the image with
makerun
But if we just need a root-shell in the container without any fance pre-tasks (e.g. for debug or to test something bespoke), we can run bash in the container with --entrypoint /bin/bash. This is wrapped in the makefile as
makeshell
Nothing vs All vs Run vs Shell
By default, if make is run without any arguments, it calls the target all. In our case this is usually mapped to the target run (which in turn may be mapped to shell).
There may be more such targets defined as per the usage of the image. Check the makefile for more information.
If the build and test steps finish without any error, and we want to use the image on other machines, it is the next step push the image we built to a container image repository (like /hub), for that, run the push target with
makepush
If the built image targets another architecture then it is required to specify the ARCH parameter when pushing. e.g.
Maintained (or sometimes a lack thereof?) by WOAHBase.
Helped you save a bit of your valuable time and effort that is best spent doing stuff you actually enjoy? If you have some pocket-change to spare, kindly consider helping out.