Skip to content

Latest commit

 

History

History
69 lines (45 loc) · 2.09 KB

README.md

File metadata and controls

69 lines (45 loc) · 2.09 KB

** As of 2020/07/15: deprecated in favor of https://github.com/franklang/node-docker **

NodeJS/NPM based Docker images to compile Front-End assets

This project provides Docker images designed to help processing front-end assets without the pain of having to deal with NodeJS/NPM local installation and package version issues.

Browse project branches to find about covered Front-End frameworks and their versions:

Common prerequisites

Customize existing image or build your own

Available NodeJS versions if any change is needed: https://github.com/nodesource/distributions/tree/master/deb.

Remember to use the raw URL given by Git in your script to avoid code formatting or line ending issues!

GOOD:

curl -s https://raw.githubusercontent.com/nodesource/distributions/master/deb/setup_6.x

BAD:

curl -s https://github.com/nodesource/distributions/blob/master/deb/setup_6.x

more to come...

Docker Tips and tricks

docker image rmi <image_ID>

or:

docker image rm <image_ID> --force
  • Open a bash to execute commands inside of a Docker image (type "exit" to quit):
docker run --rm -it <image_name> bash

Common troubleshooting

Build error

Whenever you run an "npm install" command, look at the logs and if you see something like this:

npm WARN engine package@version: wanted: {"node":">= 6"} (current: {"node":"4.9.1","npm":"2.15.11"})

...try updating provided Dockerfile with suggested version of node.

TODO

  • Better Git organisation
  • Add docker-compose.yml
  • Add more frameworks (Bootstrap 4, Bulma, ...)