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 ...
随机推荐
- Azure Storage架构介绍
Windows Azure Storage由三个重要部分或者说三种存储数据服务组成,它们是:Windows Azure Blob.Windows Azure Table和Windows Azure Q ...
- Asp.Net Core 集成 Hangfire 配置使用 Redis 存储
Hangfire 官方支持 MSSQL 与 Redis(Hangfire.Pro.Redis) 两种 ,由于我的数据库是 MYSQL ,粗略查询了一下文档,现在对 .NET Core 支持的并不够好, ...
- VM虚拟机装centos无法自动获取IP的解决方法
在虚拟机中使用ip addr 查看网卡 可以看到这个ens33,可能每台机器的名称不一样 然后找到/etc/sysconfig/network-scripts/ifcfg-eth33 编辑此文件 vi ...
- 多线程编程——java
1.进程和线程 进程:一个计算机程序的运行实例,包含了需要执行的指令:有自己的独立地址空间,包含程序内容和数据:不同进程的地址空间是互相隔离的:进程拥有各种资源和状态信息,包括打开的文件.子进程和信号 ...
- typedef在C和C++的区别?
一.struct定义结构体1.先声明结构体类型再定义变量名struct name{ member ..};name A;... 如:struct student{ int a;};student st ...
- Ajax初始接触
演示JS对象的属性,方法和事件的使用 (1)window.location.href (2)form.submit() <form action="" method=&quo ...
- mysql命令行查看建表语句
命令如下: SHOW CREATE TABLE tbl_name 例子: mysql> SHOW CREATE TABLE t\G . row ************************* ...
- WPF 数据绑定 使用Code First with Database
一.准备工作 1.开发工具 Visual Studio 2013 2.安装 Entity Framework 6 Tools for Visual Studio 2012 & 2013 来实现 ...
- 【IT笔试面试题整理】不用加减乘除做加法
[试题描述]写一个函数,求两个整数的和,要求在函数体内不得使用加减乘除四则运算符合. 基本思路是这样的: int A, B;A&B //看哪几位有进位A^B //不带进位加 考虑二进制加法的过 ...
- 【sh文件权限】无法启动tomcat -bash: ./startup.sh: Permission denied
今天在Linux上启动Tomcat,结果弹出:-bash: ./startup.sh: Permission denied 的提示. 这是因为用户没有权限,而导致无法执行, 用命令chmod 修改一下 ...