alpine镜像修改时区时间 SoulChild 收录于 虚拟化 docker 2019-11-15 10:20 约 51 字 预计阅读 1 分钟 - 次阅读 警告本文最后更新于 2020-12-30 13:02,文中内容可能已过时。dockerfile中添加如下内容即可:1 2 3 4 RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories \ && apk update && apk add tzdata && cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime \ && echo "Asia/Shanghai" > /etc/timezone \ && apk del tzdata or1 2 3 4 FROM registry.cn-shanghai.aliyuncs.com/soulchild/oracle-jdk:8u212-debian RUN ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime ENV TZ 'Asia/Shanghai' ADD ./target/xxx.jar / 请我喝杯水 赞赏 微信号 微信打赏Please enable JavaScript to view the comments powered by giscus.