GithubHelp home page GithubHelp logo

magneval / docker-angular-cli Goto Github PK

View Code? Open in Web Editor NEW

This project forked from cdue/docker-angular-cli

0.0 2.0 0.0 1 KB

Minimal Docker image allowing the use of angular-cli into a bash.

License: MIT License

docker-angular-cli's Introduction

docker-angular-cli

This is a basic Docker image which allows you to create a dev env for your AngularJS 2 projects. It only contains Node, Git, and angular-cli. Every other libraries must be installed using your project's package.json or bower.json.

For AngularJS purpose, you can use the 'tutorial' below...

Installation:

Build image

$ docker build -t "cdue/docker-angular-cli:latest" .

Or get it from the Docker Hub

$ docker pull "cdue/docker-angular-cli"

Run a bash:

$ docker run --rm -it -v $(pwd):/app/ -p 4200:4200 -p 49153:49153 "cdue/docker-angular-cli:latest"

Windows users must add a / before $(pwd)

Create a new angularjs 2 project

After you ran a bash using the above docker command, run:

$ ng new my-angular-project

Exit from your bash.

As the bash is using root user, you'll need to change your project folder owner

$ sudo chown -R your_user:your_group my-angular-project

Serving your angularjs 2 project

Go to your project folder:

$ cd my-angular-project

Then run a bash using the above docker command:

$ ng serve --host 0.0.0.0 [--port 4200 --live-reload-port 49153]

Note that you should use this 'ng serve --host ...' command because 'ng serve' simple command won't work properly (the part included between [] is optional).

Other angular-cli commands

If you want to know more about angular-cli, such as how to generate a new Component, a new Directive, or anything else, just go to https://cli.angular.io/.

docker-angular-cli's People

Contributors

cdue avatar

Watchers

 avatar  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.