diff --git a/README.md b/README.md index 44abab7..2515bda 100644 --- a/README.md +++ b/README.md @@ -70,6 +70,32 @@ If everything goes well, APK should be at: /path/to/my/folder/platforms/android/app/build/outputs/apk/debug/app-debug.apk ``` +# Build using Docker + +Go to the docker folder + +```bash +cd WHID-Mobile-Connector/docker +``` + +Build and tag the image + +```bash +docker build -t kbeflo/whid-mobile-connector-build:0.0.5 . +``` + +Start building WHID Mobile Connector using the image we've just built + +```bash +docker run -it -v "$PWD"/..:/WHID-Mobile-Connector kbeflo/whid-mobile-connector-build:0.0.5 ionic cordova build android +``` + +You're now done! You can find the apk at + +```bash +WHID-Mobile-Connector/platforms/android/app/build/outputs/apk/debug/app-debug.apk +``` + # Contributing If you're still reading until here, you rock! *We're also eager to receive/get/integrate your contributions!* :) diff --git a/docker/Dockerfile b/docker/Dockerfile new file mode 100644 index 0000000..2123f8e --- /dev/null +++ b/docker/Dockerfile @@ -0,0 +1,6 @@ +FROM beevelop/ionic:latest +ENV ANDROID_SDK_ROOT=/opt/android +ENV ANDROID_HOME=/opt/android +WORKDIR /WHID-Mobile-Connector +RUN apt-get update -y +RUN apt-get install -y openjdk-8-jdk gradle