Skip to content

Docker image include android sdk for building Ionic CLI v5 application

License

Notifications You must be signed in to change notification settings

chiticariu/chiticariu-ionic5

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

docker-ionic-android-sdk

Docker image include android sdk for building Ionic CLI v5 application

Docker Build Status

Example .gitlab-ci file

build_frontend_apk:
  stage: build_fe
  image: chiticariu/ionic5
  script:
    - "cd <Ionic Project Directory>"
    - "npm i -g npm-upgrade"
    - "npm install"
    - "mkdir www"
    - "yes | /opt/android-sdk/tools/bin/sdkmanager --licenses || true"
    - "ionic cordova build --release --prod android"
    - "cd ../.."
    - "mkdir publish_fe"
    - "cp <Ionic Project Directory>/platforms/android/app/build/outputs/apk/release/*.apk publish_fe/"
  artifacts:
    paths:
    - publish_fe/*.apk
  when: manual

Extra helper command

If you want to run or build the ionic project in computer but doesn't have Android Studio, Android SDK or Ionic Framework and this computer installed Docker. You can use helper command

  • Restore npm package
Linux:    docker run --rm -v $(pwd):/myApp chiticariu/ionic5 npm install
Windows:  docker run --rm -v %cd%:/myApp chiticariu/ionic5 npm install
  • Run docker image in terminal having the code mounted
Linux:    docker run -it -v $(pwd):/ionic_project chiticariu/ionic5 /bin/bash
Windows:  docker run -it -v %cd%:/ionic_project chiticariu/ionic5 /bin/bash
  • Preview Ionic web app in your web browser
Linux:    docker run --rm -v $(pwd):/myApp -p 8100:8100 chiticariu/ionic5 ionic serve
Windows:  docker run --rm -v %cd%:/myApp -p 8100:8100 chiticariu/ionic5 ionic serve
  • Build android apk output file
Linux:    docker run --rm -v $(pwd):/myApp chiticariu/ionic5 ionic cordova build android
Windows:  docker run --rm -v %cd%:/myApp chiticariu/ionic5 ionic cordova build android

References:

(https://github.com/Kusumoto/docker-ionic-android-sdk)

About

Docker image include android sdk for building Ionic CLI v5 application

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published