Public | Automated Build

Last pushed: 2 months ago
Short Description
Yeoman scaffolding in a Docker
Full Description

Yeoman Dockerfile

Yeoman wrapped in a Dockerfile to use it in different projects for my environment:

  • my baseimage-nodejs
  • dockered apt-cacher-ng and npm-proxy-cache
  • node_modules outside project directory


Make sure you have installed all of the following prerequisites on your development machine:

Local development and testing with compose (still experimental):

This should start up an environment for scaffolding with Yeoman.

Build with uwegerdes/nodejs image

$ docker build -t uwegerdes/yeoman .

connect local project directory to /home/node/app

$ docker run -it --rm \
    -v $(pwd):/home/node/app \
    --name yeoman \
    uwegerdes/yeoman bash

Install a generator with:

$ cd ${HOME} && \
    npm ${NPM_LOGLEVEL} ${NPM_PROXY} --save-dev install generator-generator && \
    cd ${APP_HOME}

The package.json for the Dockerfile should be used - so you can rebuild a full blown yeoman generator collection.

If you will want to restart and attach to the container (just hit RETURN to get a prompt):

$ docker start --attach -i yeoman

You can also docker commit the container to have the generators ready for a new container.


Generate with yeoman with the wizard or use a special subgenerator:

$ yo generator
$ yo generator:subgenerator <name>

Using your generator templates

If you have templates for Yeoman you can link that directory as a volume and the yo command will find it.

Please go to your project base directory and run the container with:

$ docker run -it --rm \
    -v ~/Projekte/publish/yeoman/yo_src:/home/node/yo_src \
    -v $(pwd):/home/node/app \
    --name yeoman \

Generator development support

Start another bash in a running container:

$ docker exec -it yeoman bash
$ cd /home/node/yo_src/generator-tle
$ npm test

TODO: For your convenience a gulpfile is provided for checking the the generators directory.


The MIT License

Docker Pull Command
Source Repository