Yeoman does not play very well with ROOT inside docker. To ease the pain, you should use yeoman outside and the use the docker environment to build/test/run. Since Yeoman should be used to create files this should not be a problem.
Copy/Past and execute:
cd /tmp && \
wget http://nodejs.org/dist/node-latest.tar.gz && \
tar xvzf node-latest.tar.gz && \
rm -f node-latest.tar.gz && \
cd node-v* && \
./configure && \
CXX="g++ -Wno-unused-local-typedefs" make && \
sudo CXX="g++ -Wno-unused-local-typedefs" make install && \
cd /tmp && \
rm -rf /tmp/node-v* && \
sudo npm install -g npm
Add to your .bashrc
# Node.js
export PATH="node_modules/.bin:$PATH"
Now run
source ~/.bashrc
node -v
npm -v
Bower
sudo npm install -g bower
Yo
sudo npm install -g yo
Your specific yeoman generator
sudo npm install -g generator-polymer generator-extjs generator-angular
cd Projects
mkdir newProject
cd newProject
yo
Follow yeoman instructions to set it up
Option 2 - Existing Project
cd Projects
git clone github....newProject.git
cd newProject
Option 1
sudo docker run --name projectName -p 9000:9000 -v ~/Projects/newProject:/home/project -i -t sesteva/grunt-project
This will map your local folder into a project folder inside the container. It will run npm, bower and grunt serve.
Option 2
sudo docker run --name projectName -p 9000:9000 -v ~/Projects/newProject:/home/project -it sesteva/grunt-project /bin/bash
This option overrides the default action (npm install, bower install, grunt serve) and it lets you access the command line.
Parameters Explanation:
We can use nsenter to access a running container
sudo docker-enter projectName /bin/bash
Content type
Image
Digest
sha256:47263fdef…
Size
235.2 MB
Last updated
almost 11 years ago
docker pull sesteva/grunt-project