Code Monkey home page Code Monkey logo

docker-polymer-cli's Introduction

jefferyb/polymer-cli

This is image contains a set of necessary tools for Polymer CLI and Polymer Starter Kit Development so you can get up and running developing with Polymer without installing all the tools on your own computer.

This image is built weekly, with all the latest tools...

What's new:

Supported tags

Build an app with App Toolbox

Using the Polymer Project Documentation:

Initialize & serve your project from a template
===============================================

1. Create a new project folder to start from

	$ mkdir my-app
	$ cd my-app

2. Initialize your project with an app template

	$ docker run --rm -v $(pwd):/home/polymer/app jefferyb/polymer-cli polymer init polymer-2-starter-kit

3. Serve your project

	$ docker run --name polymer-project -d -p 8081:8081 -v $(pwd):/home/polymer/app jefferyb/polymer-cli polymer serve -H 0.0.0.0

	and just point your browser to port 8081

4. When you're done serving your project

	$ docker rm -f polymer-project

How to use this image?

Go to your Polymer project folder, then execute:

docker run --name polymer-project -d -p 8081:8081 -v $(pwd):/home/polymer/app jefferyb/polymer-cli polymer serve -H 0.0.0.0

(It looks like the ports have changed from 8080 to 8081)

Once it's up and running, just point your browser to port 8081...

Quick Tip

Since the docker run command is long, and if you're going to be using it often, I would suggest creating/adding an alias for it in your .bash_profile or .bashrc, like:

alias polymer="docker run --name polymer-project --rm -p 8081:8081 -v $(pwd):/home/polymer/app jefferyb/polymer-cli polymer "

and then you can just use polymer along with the Polymer CLI commands, like:

polymer init starter-kit

to initialize a Polymer project from the starter-kit or one of other several templates, or

polymer serve -H 0.0.0.0

to run a development server that you can reach at port 8081

Polymer-CLI Commands

Polymer-CLI includes a number of tools for working with Polymer and Web Components:

  • init - Initializes a Polymer project from one of several templates
  • build - Builds an application-style project
  • lint - Lints the project
  • serve - Runs a development server
  • test - Runs tests with web-component-tester

Tools included in this image:

This image includes:

* LTS version (4.x) of Node.js
* git
* gulp
* Bower
* Polymer CLI
* generator-polymer-init-custom-build

And you can make alias for them too to work with your project with something like:

alias git-docker="docker run --rm -v $(pwd):/home/polymer/app jefferyb/polymer-cli git "
alias npm-docker="docker run --rm -v $(pwd):/home/polymer/app jefferyb/polymer-cli npm "
alias node-docker="docker run --rm -v $(pwd):/home/polymer/app jefferyb/polymer-cli node "
alias bower-docker="docker run --rm -v $(pwd):/home/polymer/app jefferyb/polymer-cli bower "
alias gulp-docker="docker run --rm -v $(pwd):/home/polymer/app -p 5000:5000 jefferyb/polymer-cli gulp "

and then, for example, you can use:

git-docker clone https://github.com/PolymerElements/polymer-starter-kit.git
npm-docker install or npm-docker update
bower-docker install or bower-docker update
gulp-docker serve

and just point your browser to port 5000 to get started with Polymer Starter Kit.

Container Shell Access

The docker exec command allows you to run commands inside a Docker container. The following command line will give you a bash shell inside your Polymer project container:

docker exec -it polymer-project bash

If you want to connect as root (for example to install a package), then execute:

docker exec -it -u root polymer-project bash

docker-polymer-cli's People

Contributors

jefferyb avatar mwinters-stuff avatar

Watchers

 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.