1.在构建镜像时还原一些包,我已经忘了报什么错,连不上nuget
方案:docker build --tag {imagename} . --network=host,构建使用宿主机网络
2.能连接网络了,但是nuget包找不到
方案: -s “https://nuget.cdn.azure.cn/v3/index.json”,我这个是随便找了个一个nuget源,可以换其他的
放在一堆COPY后面.net core 3.1 dockerfile的坑 总结
3.容器运行的时区问题,默认好像是欧洲的
方案:dockerfile加一句:
ENV TZ=Asia/Shanghai
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone

相关文章:

  • 2021-08-15
  • 2022-12-23
  • 2021-11-26
  • 2021-07-14
  • 2021-07-01
  • 2020-01-26
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-02-14
  • 2022-12-23
  • 2022-12-23
  • 2020-05-16
  • 2020-07-10
  • 2022-12-23
相关资源
相似解决方案