利用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即可,直接更新。
# 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软件的镜像,供其他人使用的更多相关文章
- Docker入门(windows版),利用Docker创建一个Hello World的web项目
Docker 当大家点开这篇博客的时候,相信大家对docker多多少少也有些认识了,最近学习docker这门技术,略微有些心得,写篇文章记录一下学习过程并帮大家跳过一些坑. docker的核心有两个, ...
- 利用DreamweaverCS5制作一个含有动态标题的教程
DreamweaverCS5怎么制作一个含有动态标题?做一个网页就先要做一个标题,一个好标题会让网页让人印象深刻,有动态的标题会让网页更生动,下面我就介绍一下怎么制作一个含有动态的标题 做一个网页 ...
- docker 制作一个容器,并上传到仓库
创建镜像的三种方法 1.基于已有的镜像的容器创建 启动一个容器并修改容器: docker run -it ubuntu:latest /bin/bash touch test 提交创建新镜像并查看制作 ...
- 利用XPT2046制作一个电位器AD转换装置
XPT2046是一款四线制电阻触摸屏控制芯片,内含12位分辨率125KHz转换速率逐步逼近型A/D转换器,支持从1.5V到5.25V的低电压I/O接口. 所谓逐步逼近型,就是输入一个模拟量,其与100 ...
- 利用 Docker 构建一个简单的 java 开发编译环境
目前 Java 语言的版本很多,除了常用的 Java 8,有一些遗留项目可能使用了 Java 7,也可能有一些比较新的的项目使用了 Java 10 以上的版本.如果想切换自己本地的 Java 开发环境 ...
- 利用Qt制作一个helloworld
使用QT创建第一个 工程: 1.打开应用程序: 2.单击画面中间偏上的 New Project按钮.[要学习使用啊~,传说它的跨平台行很好,QQ就是用它编辑的.] 3.直接点击右下角的选择 按钮. 4 ...
- 利用Python制作一个只属于和她的聊天器,再也不用担心隐私泄露啦!
------------恢复内容开始------------ 是否担心微信的数据流会被监视?是否担心你和ta聊天的小秘密会被保存到某个数据库里?没关系,现在我们可以用Python做一个只属于你和ta的 ...
- 利用html5制作一个时钟动画
<canvas id="clock" width="500" height="500" style="background- ...
- 利用Bootstrap制作一个流行的网页
首先是html承载内容: <!DOCTYPE html> <html lang="zh_CN"> <head> <meta charset ...
随机推荐
- vue项目使用axios发送请求让ajax请求头部携带cookie
最近做vue项目时遇到登录权限问题,登录以后再发送的请求头部并没有携带登录后设置的cookie,导致后台无法校验其是否登录.检查发现是vue项目中使用axios发送ajax请求导致的.查看文档得知ax ...
- sqlserver 查询当前阻塞进程 并杀掉
select * from master.dbo.sysprocesses where DB_NAME(dbid)=’test’ and spid<>@@SPID 看看阻塞的进程 然后ki ...
- ORACLE 根据sql_id查询绑定变量的传入值
当前查询: select b.NAME, b.POSITION, b.DATATYPE_STRING, b.VALUE_STRING, b.LAST_CAPTURED from v$sql_bind_ ...
- ajax传递json参数
var pros = []; for(var i = 1; i <= 2; i++) { var obj = {}; obj.id = i; obj.age = i*20; pros = pro ...
- DAY 4 下午
一些图论的知识(主要补充一下之前不了解的和比较重要) 竞赛图:完全图上的边加方向 仙人掌:每一条边至多属于一个环 前序:中左右 中序:左中右 后序:左右中 先加进去无向边 把每一个联通块看成一个大点 ...
- list转datatable,SqlBulkCopy将DataTable中的数据批量插入数据库
/// <summary> /// 将泛类型集合List类转换成DataTable /// </summary> /// <param name="list&q ...
- java SimpleDateFormat setLenient用法
参考博客:https://www.cnblogs.com/my-king/p/4276577.html SimpleDateFormat.setLenient(true) : 默认值true,不严格解 ...
- 测开之路一百二十三:快速搭建python虚拟环境
前提:已装好python3.4+且环境可正常运行 一:手动搭建: 准备好一个工作目录 管理员运行cmd,进入到准备的目录里面 执行命令:python -m venv 虚拟环境名 激活虚拟环境(在ven ...
- 解决sql语句中参数为空(null)不会更新参数的问题
用的mybatis自动生成的 情景: 修改页面中,修改某个字段,修改前有数据,修改后为空. mybatis中一般用到 如:(这种直接忽略为空的字段,不能更新空字段参数) <update id=& ...
- idea创建maven中的 jar、war、 pom项目
我用的是:2019.1版本的idea 创建maven项目时候的选项: 1: 2: 3:之后的步骤都一样按照自己的来就行