在alpine 最小构建的基础上添加CURL功能
FROM docker.io/alpine:latest
RUN echo "https://mirrors.aliyun.com/alpine/v3.6/main/" > /etc/apk/repositories
RUN echo "https://mirrors.aliyun.com/alpine/v3.6/community/" >> /etc/apk/repositories
RUN ["apk","update"]
RUN ["apk","add","curl"]
###### 添加自定义entrypoint信息, 这边主要是加载nacos服务端本地缓存
COPY entrypoint.sh /
RUN chmod 777 /entrypoint.sh
CMD ["sh", "-c","/entrypoint.sh"]
entrypoint.sh脚本内容, 加载nacos服务端本地缓存。
curl -o /dev/null -s -w %{http_code} -X POST http://${NACOSIP}:8848/nacos/v1/cs/ops/localCache