日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 运维知识 > windows >内容正文

windows

Asp.Net Core Docker镜像更新系统从wheezy改为stretch

發布時間:2023/12/4 windows 36 豆豆
生活随笔 收集整理的這篇文章主要介紹了 Asp.Net Core Docker镜像更新系统从wheezy改为stretch 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

之前寫過一個在Asp.Net Core里調用System.Drawing.Common繪圖的DEMO,部署到Docker里運行,需要更新Asp.Net Core鏡像的操作系統。

https://www.cnblogs.com/sunnytrudeau/p/9384620.html

當時用的阿里云的源


RUN?echo?"deb http://mirrors.aliyun.com/debian?wheezy main contrib non-free?\

deb-src http://mirrors.aliyun.com/debian?wheezy main contrib non-free?\

deb http://mirrors.aliyun.com/debian?wheezy-updates main contrib non-free?\

deb-src http://mirrors.aliyun.com/debian?wheezy-updates main contrib non-free?\

deb http://mirrors.aliyun.com/debian-security?wheezy/updates?main contrib non-free?\

deb-src http://mirrors.aliyun.com/debian-security?wheezy/updates?main contrib non-free" >?/etc/apt/sources.list

最近再次跑這個Demo,居然不好使了,更新系統無效了,創建容器失敗:

Step 4/11 : RUN apt-get update

?---> Running in 69abe26c3b35

Ign:1 http://mirrors.aliyun.com/debian wheezy InRelease

Ign:2 http://mirrors.aliyun.com/debian wheezy Release

Ign:3 http://mirrors.aliyun.com/debian wheezy/deb all Packages

……

Ign:14 http://mirrors.aliyun.com/debian wheezy/http://mirrors.aliyun.com/debian amd64 Packages

Reading package lists...

W: The repository 'http://mirrors.aliyun.com/debian wheezy Release' does not have a Release file.

E: Failed to fetch http://mirrors.aliyun.com/debian/dists/wheezy/non-free/binary-amd64/Packages? 404? Not Found [IP: 124.203.224.198 80]

E: Some index files failed to download. They have been ignored, or old ones used instead.

ERROR: Service 'myweb' failed to build: The command '/bin/sh -c apt-get update' returned a non-zero code: 100

百度學習了一下,才知道Asp.Net Core的Docker鏡像是基于debian這個Linux發行版構建的,以前用的版本是wheezy,現在用的新版本是stretch

版本號以及代號 ????發布日期

7 wheezy ??? ???????2013年5月4日

8 Jessie????? ???????2015年4月26日

9 stretch????? ??????2017年06月17日

所以,更新操作系統的源相應的更換一下就可以了。


RUN?echo?"deb http://mirrors.aliyun.com/debian?stretch main contrib non-free?\

deb-src http://mirrors.aliyun.com/debian?stretch main contrib non-free?\

deb http://mirrors.aliyun.com/debian?stretch-updates main contrib non-free?\

deb-src http://mirrors.aliyun.com/debian?stretch-updates main contrib non-free?\

deb http://mirrors.aliyun.com/debian-security?stretch/updates?main contrib non-free?\

deb-src http://mirrors.aliyun.com/debian-security?stretch/updates?main contrib non-free?\

deb http://mirrors.aliyun.com/debian/?stretch-backports main non-free?contrib \

deb-src http://mirrors.aliyun.com/debian/?stretch-backports main non-free?contrib" >?/etc/apt/sources.list

可以進入運行中的Asp.Net Core容器查看操作系統版本

[root@localhost ~]# docker exec -it fd70cac69589 /bin/bash

root@fd70cac69589:/app# cat /etc/issue

Debian GNU/Linux 9 \n \l

原文地址:https://www.cnblogs.com/sunnytrudeau/p/10771607.html

.NET社區新聞,深度好文,歡迎訪問公眾號文章匯總?http://www.csharpkit.com?

總結

以上是生活随笔為你收集整理的Asp.Net Core Docker镜像更新系统从wheezy改为stretch的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。