Public | Automated Build

Last pushed: 3 months ago
Short Description
Dockerized version of Polymer Project App Toolbox
Full Description

fresnizky/polymer-cli

This is image contains the Polymer App Toolbox so you can get up and running developing with Polymer without installing all the tools on your own computer.

Supported tags

Building an app with Polymer App Toolbox

From 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

    $ docker run --rm -it -v $(pwd):/home/node/app -u node fresnizky/polymer-cli polymer init

3. Serve your project

    $ docker run --rm -d -p 8080:8080 -v $(pwd):/home/node/app -u node fresnizky/polymer-cli polymer serve -H 0.0.0.0 -p 8080

    and just point your browser to port 8080

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 --rm -it -v $(pwd):/home/node/app -u node fresnizky/polymer-cli polymer '
alias polymer-serve='docker run --rm -d -p 8080:8080 -v $(pwd):/home/node/app -u node fresnizky/polymer-cli polymer serve -H 0.0.0.0 -p 8080'

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

polymer init

to initialize a Polymer project, or

polymer-serve

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

Polymer-CLI Commands

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

  • init - Create a new Polymer project from pre-configured starter templates
  • install - Install dependencies and dependency variants via Bower
  • serve - Serve elements and applications during development
  • lint - Lint a project to find and diagnose errors quickly
  • test - Test your project with web-component-tester
  • build - Build an application optimized for production
  • analyze - Generate an analyzed JSON representation of your element or application

Tools included in this image:

This image includes:

* LTS version (6.x) of Node.js
* git
* Bower
* Polymer CLI

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 run --rm -it  -v $(pwd):/home/node/app -u node fresnizky/polymer-cli bash
Docker Pull Command
Owner
fresnizky
Source Repository

Comments (1)
rasto68
4 months ago

For Windows users, you will need to turn on drive sharing in Docker settings and then use something like:

docker run --rm -it -v %cd%:/home/node/app -u node fresnizky/polymer-cli polymer init

i.e. replace $(pwd) with %cd%

Thanks for this image, we are hopefully going to use it to simplify our build process :)