之前写过一个在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的更多相关文章

  1. 优化 ASP.NET Core Docker 镜像的大小

    在这容器化的世界里,我们已经很少直接通过文件发布来运行asp.net core程序了.现在大多数情况下,我们都会使用docker来运行程序.在使用docker之前,我们往往需要打包我们的应用程序.as ...

  2. ASP.NET Core Docker jexus nginx部署-CentOS实践版

    本文用图文的方式记录了我自己搭建centos+asp.net core + docker + jexus + nginx的整个过程,希望对有同样需求的朋友有一定的参考作用. 本文主要内容如下: cen ...

  3. 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 ...

  4. ASP.NET Core & Docker 实战经验分享

    一.前言 最近一直在研究和实践ASP.NET Core.Docker.持续集成.在ASP.NET Core 和 Dcoker结合下遇到了一些坑,在此记录和分享,希望对大家有一些帮助. 二.中间镜像 我 ...

  5. ASP.NET Core & Docker & Jenkins 零基础持续集成实战

    原文:ASP.NET Core & Docker & Jenkins 零基础持续集成实战 一.本系列教程说明 源代码管理工具:Gogs 持续集成工具:Jenkins 容器:Docker ...

  6. Asp.Net Core&Docker部署到树莓派3B中

    花了一点时间将吃灰数月的树莓派装上了Docker,并在容器中部署了一个Asp.Net Core应用程序,通过花生壳映射树莓派中的程序,可以使用外网访问树莓派,玩起来很有意思(外网访问地址:http:/ ...

  7. 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 ...

  8. ASP.NET Core Docker部署

    前言 在前面文章中,介绍了 ASP.NET Core在 macOS,Linux 上基于Nginx和Jexus的发布和部署,本篇文章主要是如何在Docker容器中运行ASP.NET Core应用程序. ...

  9. ASP.NET Core + Docker +Jenkins 实现持续集成

    1.新建一个ASP.NET Core MVC应用程序: 2.将其上传到git: 3.建立Jenkins任务 (1)选择"新建任务",输入任务名称,选择"自由风格项目&qu ...

随机推荐

  1. PHP多进程系列笔记(一)

    本系列文章将向大家讲解pcntl_*系列函数,从而更深入的理解进程相关知识. PCNTL在PHP中进程控制支持默认是关闭的.您需要使用 --enable-pcntl 配置选项重新编译PHP的 CGI或 ...

  2. React技术栈梳理

    一.react是什么? react是一个js框架,可以用它来编写html页面,使用react后我们可以完全抛弃html(只需要一个主index文件),而用纯js来编写页面: 二.为什么要使用react ...

  3. 基于HA机制的MyCat架构——配置HAProxy

    HAProxy简介HAProxy提供高可用性.负载均衡以及基于TCP和HTTP应用的代理,支持虚拟主机,它是免费.快速并且可靠的一种解决方案. HAProxy特别适用于那些负载特大的web站点,这些站 ...

  4. linux之后台运行程序 nohup和& 的区别

    1.nohup 用途:不挂断地运行命令,即使终端ssh关闭了也一直运行. 语法:nohup Command [ Arg … ] [ & ] 例:nohup start.sh & 无论是 ...

  5. windows7(64位) PHP APACHE MYSQL

    - 一.安装软件准备软件版本以本人安装为例,其他版本同理,软件到各官网下载      1.Apache(httpd-2.2.19-win64)      2.PHP(php-5.3.6-Win32-V ...

  6. react高阶组件的理解

    [高阶组件和函数式编程] function hello() { console.log('hello jason'); } function WrapperHello(fn) { return fun ...

  7. Quartz2D截屏

    #import "ViewController.h" @interface ViewController () @end @implementation ViewControlle ...

  8. angularjs文档下载

    路过 存文件而已

  9. 分布式理论(六)—— Raft 算法

    前言 我们之前讲述了 Paxos 一致性算法,虽然楼主尝试用最简单的算法来阐述,但仍然还是有点绕.楼主最初怀疑自己太笨,后来才直到,该算法的晦涩难懂不是只有我一个人这么认为,而是国际公认! 所以 Pa ...

  10. C# Owin 创建与测试自己的中间件Middleware(二)

    本文纯属介绍怎么简单地创建自己的Owin.还没有理解owin概念的请看上一篇文章:http://www.cnblogs.com/alunchen/p/7049307.html 目录 1.创建项目 2. ...