Sign inSign up

almavizca/npm-proxy-cache

By almavizca

Updated over 2 years ago

Cache proxy for node.

Image
Networking
Integration & delivery
Developer tools
0

286

almavizca/npm-proxy-cache repository overview

Node cache

This image runs npm-proxy-cache service as a caching proxy for npm.

Usage

Start the server

docker run -t --name cache_npm \
    -v /var/cache/npm-cache:/cache \
    -p 172.17.0.1:8080:8080 \
    almavizca/npm-proxy-cache

Setup npm

~/.npmrc

# Using a binding on an interface that it's available for containers access too.
proxy=http://172.17.0.1:8080/
https-proxy=http://172.17.0.1:8080/
strict-ssl=false

Dockerfile

FROM node:18-alpine

RUN npm install -g npm-proxy-cache

VOLUME /cache

EXPOSE 8080
ENV NODE_TLS_REJECT_UNAUTHORIZED='0'
CMD ["npm-proxy-cache", "-h", "0.0.0.0", "-s", "/cache", "-t", "259200", "-e"]

Caches

If you are wondering how to integrate this into a workflow, take a look at the Caches repository.

Tag summary

Content type

Image

Digest

sha256:108ed5d7c

Size

49.9 MB

Last updated

over 2 years ago

docker pull almavizca/npm-proxy-cache