Docker image for polymer starter kit
Last time I tried installing Polymer on Windows, it was a huge pain in the ... . There are just too many ways for the installation process to fail. I believe that Docker containers could fix this issue. If you guys create an official Docker image for the starter kit, it will make it easier for the newcomers to join and enjoy Polymer.
Edit: This is a nice article about Why You Should Stop Installing Your WebDev Environment Locally
What issues did you face?
It was a long time ago but I guess it was related to node-gyp.
I am creating my own docker image, but having an official one would make its maintenance easier.
I think linking to your docker image would be a better approach. Would you mind sharing a link when it's ready?
sure :)
This is what I got so far for the Dockerfile. It can be a starting point but it needs docker expert touch.
FROM node:5
MAINTAINER aahoo <?@?.com>
ENV NODE_ENV=development
WORKDIR /psk
RUN git clone https://github.com/PolymerElements/polymer-starter-kit.git /psk
RUN npm install -g gulp bower
RUN npm install
RUN bower install --allow-root
EXPOSE 5000 3001
CMD ["bash"]
- build image:
docker build --rm=true --force-rm=true -t polymer-starter-kit . - run
- first time run:
docker run -it -p 5000:5000 -p 3001:3001 --name psk polymer-starter-kit - following runs:
docker start -i psk
- first time run:
gulp serve
Another option for the "first time run" is:
docker run -it -p 5000:5000 -p 3001:3001 -v hostDir:containerDir --name psk polymer-starter-kitnpm installbower install --allow-root
This allows mounting a host directory to the container. Project files will remain in the host for editing with native OS tools.
With this, everyone can have a quick preview without bothering with installation hassles. More importantly, it is guaranteed to work!
If you want, I can push my image to the Docker Hub. Looking forward to see an official image with all the pro tools installed :)
I don't think anyone on our team is planning on building a docker image so yours is probably the best one out there :D I think you should totally publish it to docker hub
Here is the image for yeoman + generator-polymer and here is for yeoman which can be extended for other generators. It is extremely convenient for those who have installation issues.
After I read this article (Why You Should Stop Installing Your WebDev Environment Locally) I switched to all my devs to docker.