Sign inSign up

nguoianphu/capacitor

By nguoianphu

Updated 12 months ago

https://github.com/nguoianphu/capacitor

Image
0

1.4K

nguoianphu/capacitor repository overview

Docker capacitor builder

Provide your html5/web app dist output directory and this docker will convert it to Android 9.0 (28) project and build it to debug .apk file.

Prepare

Build your html5/web app and get a dist directory.

Create a directory app and put the dist inside.

Put your package.json into app also

app
    dist
    package.json

Convert web app to android and build

At same folder level with app directory (outside app), run

docker run --rm -it -v ./app:/app nguoianphu/capacitor

It will initialize capacitor into app folder and generate folder android. Then it will build the android with assembleDebug command.

The debug apk file will be available at app/android/app/build/outputs/apk/debug/

More

This images contains many Android and nodejs tools, you can try others commands as well

docker run --rm -it -v ./app:/app nguoianphu/capacitor bash

# Build android
cd android
export GRADLE_USER_HOME=/app/android/.gradle
./gradlew tasks
./gradlew assembleDebug

Tag summary

Content type

Image

Digest

sha256:cf4d61f4d

Size

511.8 MB

Last updated

12 months ago

docker pull nguoianphu/capacitor