Skip to content

anzerr/node.docker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

38 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Intro

GitHub Actions status | linter GitHub Actions status | linter GitHub Actions status | linter GitHub Actions status | linter GitHub Actions status | linter GitHub Actions status | linter GitHub Actions status | linter GitHub Actions status | linter GitHub Actions status | linter GitHub Actions status | linter GitHub Actions status | linter

Docker images for NodeJs with npm and yarm and a slim version without

npm and yarm take up around 40% of the base image. They are not needed in a final version. This is useful on multi layer docker files.

Example

you can build/install all your dependencies then copy the end source to a clean layer

FROM anzerr/node:11
COPY . /app
RUN cd /app && \
	apk upgrade && apk --update add --no-cache --virtual .source-tools git build-base openssh-client findutils && \
	npm install --only=prod
	find /app -regextype egrep -regex ".*\.(ts|map|md|Dockerfile|LICENSE)$"  -type f -delete

FROM anzerr/node:slim-11
COPY COPY --from=0 /app /app
CMD ["node"]

About

Docker images for nodejs on alpine

Topics

Resources

License

Stars

Watchers

Forks

Packages