利用docker制作一个带有redis软件的镜像,供其他人使用

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即可,直接更新。

 1 # deb cdrom:[Ubuntu 16.04 LTS _Xenial Xerus_ - Release amd64 (20160420.1)]/ xenial main restricted
 2 deb-src http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial main restricted #Added by software-properties
 3
 4 # See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
 5 # newer versions of the distribution.
 6 deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial main restricted
 7 deb-src http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial multiverse universe #Added by software-properties
 8 # deb-src http://us.archive.ubuntu.com/ubuntu/ xenial main restricted
 9
10 ## Major bug fix updates produced after the final release of the
11 ## distribution.
12 deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-updates main restricted
13 deb-src http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-updates multiverse restricted universe main #Added by software-properties
14 # deb-src http://us.archive.ubuntu.com/ubuntu/ xenial-updates main restricted
15
16 ## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
17 ## team, and may not be under a free licence. Please satisfy yourself as to
18 ## your rights to use the software. Also, please note that software in
19 ## universe WILL NOT receive any review or updates from the Ubuntu security
20 ## team.
21 deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial universe
22 # deb-src http://us.archive.ubuntu.com/ubuntu/ xenial universe
23 deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-updates universe
24 # deb-src http://us.archive.ubuntu.com/ubuntu/ xenial-updates universe
25
26 ## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
27 ## team, and may not be under a free licence. Please satisfy yourself as to
28 ## your rights to use the software. Also, please note that software in
29 ## multiverse WILL NOT receive any review or updates from the Ubuntu
30 ## security team.
31 deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial multiverse
32 # deb-src http://us.archive.ubuntu.com/ubuntu/ xenial multiverse
33 deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-updates multiverse
34 # deb-src http://us.archive.ubuntu.com/ubuntu/ xenial-updates multiverse
35
36 ## N.B. software from this repository may not have been tested as
37 ## extensively as that contained in the main release, although it includes
38 ## newer versions of some applications which may provide useful features.
39 ## Also, please note that software in backports WILL NOT receive any review
40 ## or updates from the Ubuntu security team.
41 deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-backports main restricted universe multiverse
42 deb-src http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-backports main restricted universe multiverse #Added by software-properties
43 # deb-src http://us.archive.ubuntu.com/ubuntu/ xenial-backports main restricted universe multiverse
44
45 ## Uncomment the following two lines to add software from Canonical‘s
46 ## ‘partner‘ repository.
47 ## This software is not part of Ubuntu, but is offered by Canonical and the
48 ## respective vendors as a service to Ubuntu users.
49 # deb http://archive.canonical.com/ubuntu xenial partner
50 # deb-src http://archive.canonical.com/ubuntu xenial partner
51
52 deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-security main restricted
53 deb-src http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-security multiverse restricted universe main #Added by software-properties
54 # deb-src http://security.ubuntu.com/ubuntu xenial-security main restricted
55 deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-security universe
56 # deb-src http://security.ubuntu.com/ubuntu xenial-security universe
57 deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-security multiverse
58 # deb-src http://security.ubuntu.com/ubuntu xenial-security multiverse

apt-get update

原文地址:https://www.cnblogs.com/meloncodezhang/p/11231048.html

时间: 2024-10-12 11:55:34

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

利用html5制作一个时钟动画

1 <canvas id="clock" width="500" height="500" style="background-color: yellow"></canvas> 1 var clock=document.getElementById("clock"); 2 var cxt=clock.getContext("2d"); 3 function dra

利用Python制作一个连连看小游戏,边学边玩!

导语 今天我们将制作一个连连看小游戏,让我们愉快地开始吧~ 开发工具 Python版本:3.6.4 相关模块: pygame模块: 以及一些Python自带的模块 环境搭建 安装Python并添加到环境变量,pip安装需要的相关模块即可. 先睹为快 在cmd窗口运行"Game15.py"文件即可. 效果如下: 原理简介 游戏规则: 玩家通过鼠标交换相邻的拼图,若交换后水平/竖直方向存在连续三个相同的拼图,则这些拼图消失,玩家得分,同时生成新的拼图以补充消失的部分,否则,交换失败,玩家不

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

XPT2046是一款四线制电阻触摸屏控制芯片,内含12位分辨率125KHz转换速率逐步逼近型A/D转换器,支持从1.5V到5.25V的低电压I/O接口. 所谓逐步逼近型,就是输入一个模拟量,其与1000 0000 0000 对应的模拟量进行比较,大则高位取1,小则高位取0.这种思想相当于折半查询,所以可以依次从高位到低位确定所有值,以此来确定模拟量对应的数字量. 我们该如何去用这个芯片,来完成将一个模拟量转换成数字量呢? 初学者确实有很大的困难,我们需要学会怎么去看它的芯片手册. 上图是它的一个

利用canvas制作一个时钟

先上张效果图. 利用canvas来画出一个时钟,想想都是一件神奇又美妙的事情.话不多说,先上代码吧. <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-sca

结合js利用画布制作一个时钟

首先 搭建canvas画布格式: 动态获取画布的宽和高方便变换,利用translate将圆中心坐标改为0 0: <canvas width="800px" height="800px"></canvas> <script> var canvas=document.querySelector("canvas"); var ctx=canvas.getContext("2d"); var wid

利用python制作一个有趣的微信机器人

(想看更详细的同学可以参考:https://www.cnblogs.com/liyanyinng/p/10963105.html) 利用python在微信上制作小型机器人,下面可以来看一下下面的代码 1 #-*- coding:utf-8 -*- 2 import itchat 3 import requests 4 5 def get_response(msg): 6 apiurl = 'http://i.itpk.cn/api.php' #//moli机器人的网址 7 data={ 8 "q

[UI组件基础] 制作一个带有底部导航以及顶部导航的single view application

最近开始写博客了,把我学习到的东西进行汇总和总结. 很多初学iOS手机应用程序开发的刚开始肯定是抓头的,搞不好,是大片大片的头发往下扯. 因为很迷茫啊,都不知道要怎么弄,有真机有大神帮忙的人还好说,没有机器又没有朋友的人就惨了,完全不知道从何开始. 其实我觉得把,如果是真想学,最次最次,你最少弄个XCode用用看. 前期如果没有XCode,没有苹果电脑,也可以先从基础语法开始学起,其实oc语法也很蛋疼的,什么*啊,alloc啊init啊.估计跟大家想象的世界完全不同,学了java的人再来看oc,

利用Qt制作一个helloworld

使用QT创建第一个 工程: 1.打开应用程序: 2.单击画面中间偏上的 New Project按钮.[要学习使用啊~,传说它的跨平台行很好,QQ就是用它编辑的.] 3.直接点击右下角的选择 按钮. 4.为我们的项目起一个名字,并 放在一个 路径下面.[可以点击设为默认路径,避免修改路径的繁琐] 5.下一步 6. 在基类中,点选下拉菜单调成QWidget,之后点击下一步. 修改后: 点击下一步. 7.点击完成. 8.在菜单栏中点击构建,并点击构建项目"Test". 9.然后在左下角点击查

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

首先是html承载内容: <!DOCTYPE html> <html lang="zh_CN"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width,initial-scale=1"> <title>Bootstrap实战</title>