Slim node docker with some utils for dev
10K+
This repository contains a set of docker based on node. I use these dockers to limit npm install and always know what I really have.
Dockerfile linkslatest (Dockerfile)carto (carto/Dockerfile)There are some shortcuts you can use thanks to your bashrc or bash_aliases.
USER variable (this is to avoid all new files created by docker are owned by root).NODE_OPTS variable# This will let you use node repl or start a node program.
alias node="docker run -ti --rm -e USER_ID=1000 -v $(pwd):/usr/src/app ${NODE_OPTS} joxit/node node"
# This will let you use npm install etc (-g option will not work as you want).
alias npm="docker run -ti --rm -e USER_ID=1000 -v $(pwd):/usr/src/app ${NODE_OPTS} joxit/node npm"
# This will let you use more than one command at the time.
alias node_bash="docker run -ti --rm -e USER_ID=1000 -v $(pwd):/usr/src/app ${NODE_OPTS} joxit/node bash"
# Use cartoCSS utilities
alias carto="docker run -ti --rm -e USER_ID=1000 -v $(pwd):/usr/src/app ${NODE_OPTS} joxit/node:carto cartoyml"
alias cartocc="docker run -ti --rm -e USER_ID=1000 -v $(pwd):/usr/src/app ${NODE_OPTS} joxit/node:carto cartoymlcc"
# This will save node_modules in my directory with my source code and node_modules will be owned by root
NODE_OPTS="-e USER_ID=0" npm install
# I use NODE_OPTS var to add new options to the docker (such as port for a server).
NODE_OPTS="-p 3000:3000" node server/index.js
Carto is a fast CSS-like map stylesheets https://github.com/mapbox/carto/blob/master/docs/latest.md
This docker contains carto, cartocc and cartoymlcc.
Content type
Image
Digest
Size
118.9 MB
Last updated
about 8 years ago
docker pull joxit/nodePulls:
164
Last week