GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - marcoturi/ionic-docker: An ionic image for CI

BranchesTags
Open more actions menu

Latest commit

 

History

50 Commits
50 Commits

Folders and files

NameName
Last commit message
Last commit date
.gitignore
.gitignore
 
 
Dockerfile
Dockerfile
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 

Repository files navigation

MIT licensed Docker Hub

Ionic-docker

A ionic 1/2 image to be used with Gitlab CI

Inspired by:

  • https://github.com/procoders/ionic-docker
  • https://hub.docker.com/r/webnicer/protractor-headless/~/dockerfile/
  • https://github.com/agileek/docker
  • http://stackoverflow.com/questions/29558444/angularjs-grunt-bower-gitlab-ci-setup-for-testing
  • https://github.com/tippiq/docker-protractor

Features

  • Node
  • Npm or Yarn
  • Ionic
  • Cordova
  • Android sdk and build tools
  • Ready to run Google Chrome Headless for e2e tests
  • Ruby
  • Scss-lint support

Usage

docker run -ti --rm -p 8100:8100 -p 35729:35729 marcoturi/ionic

If you have your own ionic sources, you can launch it with:

docker run -ti --rm -p 8100:8100 -p 35729:35729 -v /path/to/your/ionic-project/:/myApp:rw marcoturi/ionic

Automation

With this alias:

alias ionic="docker run -ti --rm -p 8100:8100 -p 35729:35729 --privileged -v /dev/bus/usb:/dev/bus/usb -v ~/.gradle:/root/.gradle -v \$PWD:/myApp:rw marcoturi/ionic ionic"

Due to a bug in ionic, if you want to use ionic serve, you have to use --net host option :

alias ionic="docker run -ti --rm --net host --privileged -v /dev/bus/usb:/dev/bus/usb -v ~/.gradle:/root/.gradle -v \$PWD:/myApp:rw marcoturi/ionic ionic"

Know you need gradle for android, I suggest to mount ~/.gradle into /root/.gradle to avoid downloading the whole planet again and again

you can follow the ionic tutorial (except for the ios part...) without having to install ionic nor cordova nor nodejs on your computer.

ionic start myApp tabs
cd myApp
ionic serve
# If you didn't used --net host, be sure to chose the ip address, not localhost, or you would not be able to use it

open http://localhost:8100 and everything works.

Android tests

You can test on your android device, just make sure that debugging is enabled.

cd myApp
ionic cordova platform add android
ionic cordova build android
ionic cordova run android

FAQ

  • The application is not installed on my android device
    • Try docker run -ti --rm -p 8100:8100 -p 35729:35729 --privileged -v /dev/bus/usb:/dev/bus/usb -v \$PWD:/myApp:rw marcoturi/ionic adb devices your device should appear
  • The adb devices show nothing whereas I can see it when I do adb devices on my computer
    • You can't have adb inside and outside docker at the same time, be sure to adb kill-server on your computer before using this image

About

An ionic image for CI

hub.docker.com/r/marcoturi/ionic

Topics

androidchrome-headlesscicordovadokergitlab-ciionicscss-lintyarn

Resources

Readme
MIT license
Activity

Stars

57 stars

Watchers

7 watching

Forks

38 forks
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.