Develop Bower projects without installing bower.
which will create a sub-folder
bower_components and download the dependencies there.
If you want to play with a Bower-based project like Polymer, you might not want to install Bower and all its dependencies on your system. With docker-bower you can isolate the environment in a Docker container and install all dependencies there. Once you are done, remove the container, and your system stays clean.
Run from Docker Hub
A pre-built image is available on Docker Hub. It can be run as follows:
Make sure you have your Bower-based project in a directory like
/path/to/my-project, and it contains the file
Run a docker container from that image, and map
/path/to/my-projectinto that container (replace
/path/to/my-projectwith the path to your project).
MY_PROJECT="/path/to/my-project" docker run -v "$MY_PROJECT:/home/bower/workspace" -t -i fstab/bower
The container will spawn a
bash shell that you can use to run Bower commands (like
bower install --save for adding new bower components), and it runs a HTTP server on port
8000 for viewing the project.