Docker file for base yeoman install
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.


Dockerfile for base yeoman install, with a few generators pre-installed.


  1. Install Docker.

  2. docker run -i -t silarsis/yeoman

    (alternatively, build from github: docker build -t="silarsis/yeoman"


docker run -i -t silarsis/yeoman

This will run the container and log you in as the "yeoman" user, ready to "yo".

docker run -i -t silarsis/yeoman -c grunt serve

This will run the grunt server inside the container.


"sudo" works - if you need root, sudo -s will get you there.

The default grunt port (9000) is exposed by default.

Docker hints:

  • docker start -a -i <containerid> will restart a stopped container and re-attach you to the bash process
  • docker inspect -format '{{ .NetworkSettings.IPAddress }}' <containerid> will give you the IP address of the currently running container
  • docker run -P -i -t silarsis/yeoman will map port 9000 to a port on the host, and docker port <containerid> 9000 will show you what port that ends up on

This Dockerfile should provide a good base image for development work - as an example, based on the Docker Node.js example, you could have a Dockerfile that looks like (untested, assumes your code is in the same directory as your Dockerfile):

  FROM silarsis/yeoman
  MAINTAINER Kevin Littlejohn ""
  ADD . /src
  RUN cd /src; npm install
  EXPOSE 9000
  USER yeoman
  CMD ["grunt", "serve"]

and run with docker build -t <username>/yeoman-dev .; docker run -P -d <username>/yeoman-dev

In application source, put in Gruntfile.js hostname: for expose port 9000 on the host for any IP:

connect: {
  options: {
    port: 9000,
    // Change this to '' to access the server from outside.
    hostname: '',
    livereload: 35729