Public | Automated Build

Last pushed: 2 years ago
Short Description
FROM node RUN npm install -g grunt-cli
Full Description

nodeJS, grunt


  • using Your local SSH key
  • store cache files locally
  • node works as Your local user (thanks to "UID mapping")

UID mapping

Docker's node works as "nodejs" user. After mapping Your local directory with project into docker's /opt, entrypoint load UID of /opt and replace UID of "nodejs" user to new value. The result is working as Your local user (no "permission denied" errors)


  • Create Makefile in Your project

    CMD=$(filter-out $@,$(MAKECMDGOALS))
    ip: ; @docker inspect --format '{{ .NetworkSettings.IPAddress }}' ${CMD}
    npm: ; @docker run --rm -it \
             -v ~/.ssh/:/home/nodejs/.ssh \
             -v ~/.docker-npm/:/home/nodejs/.npm \
             -v $$(pwd)/:/opt \
             amsdard/grunt ${CMD}
    grunt: ; @make npm CMD="grunt ${CMD}"
    %: ; @:
  • set up /home/nodejs/.ssh docker's location to use Your local SSH keys

  • set up /home/nodejs/.npm docker's npm cache directory
  • set up /opt docker's location as main project directory (with composer.json)


make npm
make grunt build
make grunt CMD="--help"
Docker Pull Command
Source Repository