Develop Bower projects without installing bower.
Bower is a dependency management tool often used in Web front-end development. For example, the Polymer project uses Bower as its recommended installation tool.
If you check out a Bower-based project from GitHub, it will typically contain a bower.json file which lists the dependencies for that project. In order to download these dependencies, you run
bower install
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.
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 /path/to/my-project/bower.json
Run a docker container from that image, and map /path/to/my-project into that container (replace /path/to/my-project with 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.
Content type
Image
Digest
sha256:2e8ec41ed…
Size
174.7 MB
Last updated
almost 11 years ago
docker pull fstab/bower