main
yarn 1.x keeps its own registry config and does not inherit npm's, so images that install with yarn still hit the public registry. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Smart Mirror
A simple script to speed up docker build by using mirror sites in China.
How it works
It checks if your are in China office by checking nexus.tdology.com`IP. If yes(a private IP address, but not a public one), It tries to use the mirror sites in China for speeding up the build.
How to use
In your Dockerfile, try to run the script before doing anything, e.g.
FROM alpine:3.18
ADD https://git.piicloud.cn/public/smart-mirror/raw/branch/main/smart-mirror.sh /tmp/smart-mirror.sh
RUN sh /tmp/smart-mirror.sh
ENV no_proxy=nexus.tdology.com,localhost,127.0.0.1
ENV NO_PROXY=nexus.tdology.com,localhost,127.0.0.1
or
FROM alpine:3.18
RUN curl -fsSL https://git.piicloud.cn/public/smart-mirror/raw/branch/main/smart-mirror.sh | sh
Description
Languages
Shell
100%