Cache proxy for node.
286
This image runs npm-proxy-cache service as a caching proxy for npm.
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
~/.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
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"]
If you are wondering how to integrate this into a workflow, take a look at the Caches repository.
Content type
Image
Digest
sha256:108ed5d7c…
Size
49.9 MB
Last updated
over 2 years ago
docker pull almavizca/npm-proxy-cache