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
Asp.Net Core Docker镜像更新系统从wheezy改为stretch的更多相关文章
- 优化 ASP.NET Core Docker 镜像的大小
在这容器化的世界里,我们已经很少直接通过文件发布来运行asp.net core程序了.现在大多数情况下,我们都会使用docker来运行程序.在使用docker之前,我们往往需要打包我们的应用程序.as ...
- ASP.NET Core Docker jexus nginx部署-CentOS实践版
本文用图文的方式记录了我自己搭建centos+asp.net core + docker + jexus + nginx的整个过程,希望对有同样需求的朋友有一定的参考作用. 本文主要内容如下: cen ...
- asp.net core 3.0 更新简记
asp.net core 3.0 更新简记 asp.net core 3.0 更新简记 Intro 最近把活动室预约项目从 asp.net core 2.2 更新到了 asp.net core 3.0 ...
- ASP.NET Core & Docker 实战经验分享
一.前言 最近一直在研究和实践ASP.NET Core.Docker.持续集成.在ASP.NET Core 和 Dcoker结合下遇到了一些坑,在此记录和分享,希望对大家有一些帮助. 二.中间镜像 我 ...
- ASP.NET Core & Docker & Jenkins 零基础持续集成实战
原文:ASP.NET Core & Docker & Jenkins 零基础持续集成实战 一.本系列教程说明 源代码管理工具:Gogs 持续集成工具:Jenkins 容器:Docker ...
- Asp.Net Core&Docker部署到树莓派3B中
花了一点时间将吃灰数月的树莓派装上了Docker,并在容器中部署了一个Asp.Net Core应用程序,通过花生壳映射树莓派中的程序,可以使用外网访问树莓派,玩起来很有意思(外网访问地址:http:/ ...
- Ubuntu-Docker[1]安装Docker,通过Docker部署net core代码,需要结合[.NET Core 18]发布、ASP.NET Core Docker部署
1)通过系统自带包安装 通过自带包安装,可能Docker版本较旧 $ sudo apt-get update Reading package lists... Done $ sudo apt-get ...
- ASP.NET Core Docker部署
前言 在前面文章中,介绍了 ASP.NET Core在 macOS,Linux 上基于Nginx和Jexus的发布和部署,本篇文章主要是如何在Docker容器中运行ASP.NET Core应用程序. ...
- ASP.NET Core + Docker +Jenkins 实现持续集成
1.新建一个ASP.NET Core MVC应用程序: 2.将其上传到git: 3.建立Jenkins任务 (1)选择"新建任务",输入任务名称,选择"自由风格项目&qu ...
随机推荐
- Vue中使用watch来监听数据变化
写法一: methods:{ //监听isMD upProp(){ if(this.isMD){//如果isMD等于true 就把storeManagerName赋值给isStoreManagerNa ...
- Java NIO系列教程(九) ServerSocketChannel
Java NIO中的 ServerSocketChannel 是一个可以监听新进来的TCP连接的通道, 就像标准IO中的ServerSocket一样.ServerSocketChannel类在 jav ...
- cool--music
1.三年的赌注 2.非酋 3.Swan Song 4.Better Than A Hallelujah
- 微服务之kong+consul(二)
一.kong 1.使用kong来做服务网关,目前kong使用的是0.13版本现在地址:https://docs.konghq.com/install,kong的社区版没有dashboard,可以使用k ...
- SPA页面初试
之前一直很好奇,SPA应用到底是怎么实现的,昨天无意间看到了有一篇介绍的文章,就想着来试一下水(以下根据我的理解所写,可能会让你看的云里雾里,如果想加深了解,最好先了解下window.location ...
- 线程池ThreadPoolExecutor的一种扩展办法
概述 在JAVA的世界里,如果想并行的执行一些任务,可以使用ThreadPoolExecutor. 大部分情况下直接使用ThreadPoolExecutor就可以满足要求了,但是在某些场景下,比如瞬时 ...
- maven国内aliyun镜像
打开maven安装目录下conf文件夹的settings.xml文件 配置本地仓库 <localRepository>D:/maven/repository</localReposi ...
- RabbitMQ远程不能访问问题的解决
刚刚安装的RabbitMQ-Server-3.3.5,并且也已经开启了Web管理功能,但是现在存在一个问题: 出于安全的考虑,guest这个默认的用户只能通过http://localhost:1567 ...
- 使用 Node.js 搭建微服务网关
目录 Node.js 是什么 安装 node.js Node.js 入门 Node.js 应用场景 npm 镜像 使用 Node.js 搭建微服务网关 什么是微服务架构 使用 Node.js 实现反向 ...
- XJad反编译工具
XJad反编译工具 我们写的java文件,编译后就会生成相应的字节码文件,也就是.java文件经过编译以后生成.class文件 现在,假设我们现在存在这样一个问题:就是我们想自己动手验证注释会不会被编 ...