Giter Site home page Giter Site logo

ionic-docker's Introduction

Ionic-docker

A ionic 2 image to be used with Gitlab CI

Features

  • Node 6.9.1
  • Npm 3.10.8
  • Ionic 2.1.12
  • Cordova 5.3.1
  • android-23
  • Ready to run Google Chrome for e2e tests
  • Ruby 2.2 (usefull for scss-lint)
  • Yarn 0.17.3
  • Android SDK (build tools, platform tools, android-23)

Usage

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

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 fallen90/ionic-docker

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 fallen90/ionic-docker 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 fallen90/ionic-docker 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 platform add android
ionic build android
ionic 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 fallen90/ionic-docker 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

ionic-docker's People

Contributors

fallen90 avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.