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.
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
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/
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
https://capacitorjs.com/docs/android
Refer this github action if you want to build everything on github: https://github.com/nguoianphu/pkmn.help/blob/vitejs/.github/workflows/build.yml