1. 宿主机在etc/apt/下创建一个haha的文件夹

2.宿主机将haha文件夹映射到容器的虚拟系统中etc/apt/

3. 此时,可以在宿主机和容器虚拟机中同步创建和删除文件

4. 将宿主机中的source.list文件同步到容器浏览器中。

4.1 更新前容器虚拟机中的更新源

4.2 同步替换后的更新源

4.2.1 宿主机将sources.list拷贝到同步文件夹

4.2.2 容器虚拟机从同步文件夹中将sources.list拷贝到对应位置,覆盖掉原来的sources.list

4.2.3 容器虚拟机更新源

apt-get update

报错:Is the package apt-transport-https installed?

安装:apt-get install apt-transport-https 依然报同样的错

报错:Unable to locate package apt-transport-https

原因:sources.list 问题,换成清华园的sources.list即可,直接更新。

 # deb cdrom:[Ubuntu 16.04 LTS _Xenial Xerus_ - Release amd64 (20160420.1)]/ xenial main restricted
deb-src http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial main restricted #Added by software-properties # See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial main restricted
deb-src http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial multiverse universe #Added by software-properties
# deb-src http://us.archive.ubuntu.com/ubuntu/ xenial main restricted ## Major bug fix updates produced after the final release of the
## distribution.
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-updates main restricted
deb-src http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-updates multiverse restricted universe main #Added by software-properties
# deb-src http://us.archive.ubuntu.com/ubuntu/ xenial-updates main restricted ## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team, and may not be under a free licence. Please satisfy yourself as to
## your rights to use the software. Also, please note that software in
## universe WILL NOT receive any review or updates from the Ubuntu security
## team.
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial universe
# deb-src http://us.archive.ubuntu.com/ubuntu/ xenial universe
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-updates universe
# deb-src http://us.archive.ubuntu.com/ubuntu/ xenial-updates universe ## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team, and may not be under a free licence. Please satisfy yourself as to
## your rights to use the software. Also, please note that software in
## multiverse WILL NOT receive any review or updates from the Ubuntu
## security team.
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial multiverse
# deb-src http://us.archive.ubuntu.com/ubuntu/ xenial multiverse
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-updates multiverse
# deb-src http://us.archive.ubuntu.com/ubuntu/ xenial-updates multiverse ## N.B. software from this repository may not have been tested as
## extensively as that contained in the main release, although it includes
## newer versions of some applications which may provide useful features.
## Also, please note that software in backports WILL NOT receive any review
## or updates from the Ubuntu security team.
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-backports main restricted universe multiverse
deb-src http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-backports main restricted universe multiverse #Added by software-properties
# deb-src http://us.archive.ubuntu.com/ubuntu/ xenial-backports main restricted universe multiverse ## Uncomment the following two lines to add software from Canonical's
## 'partner' repository.
## This software is not part of Ubuntu, but is offered by Canonical and the
## respective vendors as a service to Ubuntu users.
# deb http://archive.canonical.com/ubuntu xenial partner
# deb-src http://archive.canonical.com/ubuntu xenial partner deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-security main restricted
deb-src http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-security multiverse restricted universe main #Added by software-properties
# deb-src http://security.ubuntu.com/ubuntu xenial-security main restricted
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-security universe
# deb-src http://security.ubuntu.com/ubuntu xenial-security universe
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-security multiverse
# deb-src http://security.ubuntu.com/ubuntu xenial-security multiverse

apt-get update

利用docker制作一个带有redis软件的镜像,供其他人使用的更多相关文章

  1. Docker入门(windows版),利用Docker创建一个Hello World的web项目

    Docker 当大家点开这篇博客的时候,相信大家对docker多多少少也有些认识了,最近学习docker这门技术,略微有些心得,写篇文章记录一下学习过程并帮大家跳过一些坑. docker的核心有两个, ...

  2. 利用DreamweaverCS5制作一个含有动态标题的教程

    DreamweaverCS5怎么制作一个含有动态标题?做一个网页就先要做一个标题,一个好标题会让网页让人印象深刻,有动态的标题会让网页更生动,下面我就介绍一下怎么制作一个含有动态的标题   做一个网页 ...

  3. docker 制作一个容器,并上传到仓库

    创建镜像的三种方法 1.基于已有的镜像的容器创建 启动一个容器并修改容器: docker run -it ubuntu:latest /bin/bash touch test 提交创建新镜像并查看制作 ...

  4. 利用XPT2046制作一个电位器AD转换装置

    XPT2046是一款四线制电阻触摸屏控制芯片,内含12位分辨率125KHz转换速率逐步逼近型A/D转换器,支持从1.5V到5.25V的低电压I/O接口. 所谓逐步逼近型,就是输入一个模拟量,其与100 ...

  5. 利用 Docker 构建一个简单的 java 开发编译环境

    目前 Java 语言的版本很多,除了常用的 Java 8,有一些遗留项目可能使用了 Java 7,也可能有一些比较新的的项目使用了 Java 10 以上的版本.如果想切换自己本地的 Java 开发环境 ...

  6. 利用Qt制作一个helloworld

    使用QT创建第一个 工程: 1.打开应用程序: 2.单击画面中间偏上的 New Project按钮.[要学习使用啊~,传说它的跨平台行很好,QQ就是用它编辑的.] 3.直接点击右下角的选择 按钮. 4 ...

  7. 利用Python制作一个只属于和她的聊天器,再也不用担心隐私泄露啦!

    ------------恢复内容开始------------ 是否担心微信的数据流会被监视?是否担心你和ta聊天的小秘密会被保存到某个数据库里?没关系,现在我们可以用Python做一个只属于你和ta的 ...

  8. 利用html5制作一个时钟动画

    <canvas id="clock" width="500" height="500" style="background- ...

  9. 利用Bootstrap制作一个流行的网页

    首先是html承载内容: <!DOCTYPE html> <html lang="zh_CN"> <head> <meta charset ...

随机推荐

  1. SQL Server系列之 删除大量数据

    一.写在前面 - 想说爱你不容易 为了升级数据库至SQL Server 2008 R2,拿了一台现有的PC做测试,数据库从正式库Restore(3个数据库大小夸张地达到100G+),而机器内存只有可怜 ...

  2. 嵌入式Linux之虚拟内存地址空间布局(Virtual Memory Space)

    虚拟内存地址空间 Linux内核属于微内核的范畴,内核控制计算机的硬件资源,运行在特权模式:用户态应用程序运行在普通用户模式,无法直接访问硬件资源,必须依托于内核提供的资源,如CPU资源.Memory ...

  3. react 配置ant时遇见的一个Error: Multiple configuration files found. Please remove one: – package.json#babel – .babelrc 解决方案

    这个问题是create react app 里面的package.json里面已经配置了   "babel": {     "presets": [       ...

  4. (转)linux nc命令使用详解

    linux nc命令使用详解 原文:https://www.2cto.com/os/201306/220971.html 功能说明:功能强大的网络工具 语 法:nc [-hlnruz][-g<网 ...

  5. 阶段1 语言基础+高级_1-3-Java语言高级_02-继承与多态_第4节 多态_15_多态的概述

    不是多种状态,而是有多种形态 继承是多态的前提 子类就是一个父类.学生就是一个人 多态性说的是这个对象.

  6. 测开之路一百:jquery引用、语法、事件

    工作中一般会使用jquery代替js,jquery官网:https://jquery.com/ 引用jquery: 第一种方式:下载引用: jquery下载官网:https://jquery.com/ ...

  7. python读写ini配置文件

    像邮箱等信息是可以写在配置文件里面的,python有一个配置模块ConfigParser,可以处理配置文件信息 目录 1.配置模块ConfigParser 2.基本应用 1.配置模块ConfigPar ...

  8. KETTLE——(二)数据抽取

    过了个春节,好长时间没有更新了,今天接着写第二部分——数据抽取. 进入界面以后会发现左侧菜单有两个东西:转换和作业:简单说一下,转换是单次的转换,不可重复,但可重复利用:作业是汇聚了其他操作和多次(可 ...

  9. vue组件间通信子与父

    二.组件间通信(子组件传值给父组件) 通过事件的方式来完成数据的传输. ①在父组件中 定义一个方法,用来接收子组件所通过事件传来的值 methods:{ recvMsg:function(msg){ ...

  10. 应用安全-CMF/CMS漏洞整理

    CMS识别 云悉 http://whatweb.bugscaner.com/batch.html CakePHP  CakePHP <= / Cache Corruption Exploit 2 ...