Docker国内镜像source
现在使用docker的镜像大多基于几种基本Linux系统。虽然我不需要在容器李安装很多东西,但经常需要一些必要的工具,而基础镜像里并不包含,比如vim, ifconfig, curl等。考虑下载速度,最后修改镜像的source为国内地址。现在收集一些docker的基础镜像中国镜像源。
Github: https://github.com/Ryan-Miao/docker-china-source
docker hub国内镜像
下载docker image也可以走国内镜像。
/etc/docker/daemon.json
{
"registry-mirrors": ["https://registry.docker-cn.com", "http://hub-mirror.c.163.com","https://docker.mirrors.ustc.edu.cn"]
}
alpine
Alpine Linux is a security-oriented, lightweight Linux distribution based on musl libc and busybox.
特点是轻量,小,现在docker推荐的base镜像系统,绝大多数公共docker镜像都有alpine版本。
新建repositories
https://mirrors.aliyun.com/alpine/v3.6/main/
https://mirrors.aliyun.com/alpine/v3.6/community/
现在制作一个lua解析容器:
Dockerfile
FROM alpine
COPY repositories /etc/apk/repositories
RUN apk update && apk add vim curl net-tools lua
centos6
有时候还是想继续用centos6.
wget http://mirrors.aliyun.com/repo/Centos-6.repo
Dockerfile
FROM centos:6
MAINTAINER Ryan Miao
WORKDIR /tmp
COPY Centos-6.repo /etc/yum.repos.d/CentOS-Base.repo
RUN yum clean all && yum makecache
RUN yum install -y vim git net-tools curl wget
debian
Debian是社区类Linux的典范,是迄今为止最遵循GNU规范的Linux系统, 包括Debian和Ubuntu等.
很多镜像选择debian作为基础镜像,比如nginx
新建sources.list
deb http://mirrors.aliyun.com/debian/ stretch main non-free contrib
deb-src http://mirrors.aliyun.com/debian/ stretch main non-free contrib
deb http://mirrors.aliyun.com/debian-security stretch/updates main
deb-src http://mirrors.aliyun.com/debian-security stretch/updates main
deb http://mirrors.aliyun.com/debian/ stretch-updates main non-free contrib
deb-src http://mirrors.aliyun.com/debian/ stretch-updates main non-free contrib
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
deb http://mirrors.163.com/debian/ stretch main non-free contrib
deb http://mirrors.163.com/debian/ stretch-updates main non-free contrib
deb http://mirrors.163.com/debian/ stretch-backports main non-free contrib
deb-src http://mirrors.163.com/debian/ stretch main non-free contrib
deb-src http://mirrors.163.com/debian/ stretch-updates main non-free contrib
deb-src http://mirrors.163.com/debian/ stretch-backports main non-free contrib
deb http://mirrors.163.com/debian-security/ stretch/updates main non-free contrib
deb-src http://mirrors.163.com/debian-security/ stretch/updates main non-free contrib
Dockerfile
FROM nginx:1.15.10
MAINTAINER Ryan Miao <ryan.miao@nf-3.com>
COPY sources.list /etc/apt/sources.list
RUN apt-get update
RUN apt-get install -y net-tools procps curl wget vim telnet cron
Docker国内镜像source的更多相关文章
- Docker - Docker国内镜像的配置及使用
Docker国内镜像 DaoCloud - Docker加速器 阿里云 - 开发者平台 微镜像 - 希云cSphere 镜像广场 - 时速云 灵雀云 网易蜂巢 阿里云的Docker加速器 阿里云 - ...
- Docker - 国内镜像的配置及使用
Docker国内镜像 DaoCloud - Docker加速器 阿里云 - 开发者平台 微镜像 - 希云cSphere 网易蜂巢 阿里云的Docker加速器 阿里云 - 开发者平台:https://d ...
- docker国内镜像拉取和镜像加速registry-mirrors配置修改
docker国内镜像拉取和镜像加速registry-mirrors配置修改 学习了:http://blog.csdn.net/u014231523/article/details/61197945 站 ...
- docker 国内镜像源
参考:docker 国内镜像源 作者:Joncc Linux环境 # vi /etc/docker/daemon.json { "registry-mirrors": [" ...
- docker安装mysql、es、jenkins等一些步骤以及如何设置docker国内镜像
CentOS7安装Docker步骤: (0)删除旧的可能安装过的包 yum remove docker \ docker-client \ ...
- Docker国内镜像源设置
编辑json文件,添加如下内容后重启docker即可. [root@Docker ~]# cat /etc/docker/daemon.json{ "registry-mirrors&quo ...
- 使用docker国内镜像解决方案
1:蜂巢镜像 https://c.163yun.com/hub#/m/library/ 例如: docker pull hub.c.163.com/library/nginx:1.8 再次执行dock ...
- Docker:docker国内镜像加速
创建或修改 /etc/docker/daemon.json 文件,修改为如下形式 { "registry-mirrors": [ "https://registry.do ...
- docker 国内镜像加速
CentOS7 对于使用 systemd 的系统,请在 /etc/docker/daemon.json 中写入如下内容(如果文件不存在请新建该文件): {"registry-mirrors& ...
随机推荐
- Codeforces 542A Place Your Ad Here
Place Your Ad Here 把没用的第一类区间去掉之后, 排序, 然后枚举第二类区间, 在上面死命二分就好了. #include<bits/stdc++.h> #define L ...
- ES6新特性:使用export和import实现模块化(转载)
在ES6前, 前端就使用RequireJS或者seaJS实现模块化, requireJS是基于AMD规范的模块化库, 而像seaJS是基于CMD规范的模块化库, 两者都是为了为了推广前端模块化的工 ...
- group by 和where 条件后面不能用刚设置的别名。
select count(*),c_xy_bj a from z_user group by c_xy_bj 这个group by后面不能使用c_xy_bj 字段的别名a,只有外面再嵌套sel ...
- HDU 1010 Tempter of the Bone (DFS+可行性奇偶剪枝)
<题目链接> 题目大意:一个迷宫,给定一个起点和终点,以及一些障碍物,所有的点走过一次后就不能再走(该点会下陷).现在问你,是否能从起点在时间恰好为t的时候走到终点. 解题分析:本题恰好要 ...
- php mysql 编码问题
php mysql 编码问题 问题: PHP从数据库中读取数据,并echo出来,数据中文显示正常:但是echo出新定义的中文字符串,新定义的字符串会乱码. 由此可能是数据库中提取出来的中文编码和php ...
- Java中位运算符的使用
先预知识: 数据在计算机中是以二进制的形式进行存储的,而二进制在内存中是以补码的形式进行存储的.在介绍位运算之前,首先来看一下原码.反码和补码的概念.由于正数的原码.反码和补码的形式都是一样的,所以以 ...
- Spring监听,ApplicationListener
import java.util.HashMap; import java.util.Map; import org.apache.commons.lang3.StringUtils; import ...
- KenBurns特效组件KenBurnsView
KenBurns特效组件KenBurnsView KenBurns特效是一种静态图片展现方式.通过镜头缩放和平移的方式来展现图片,让静态图片产生动态视觉的效果.KenBurns特效可以通过KenB ...
- DRF的视图
DRF的视图 APIView 我们django中写CBV的时候继承的是View,rest_framework继承的是APIView,那么他们两个有什么不同呢~~~ urlpatterns = [ ...
- Python贪婪算法
贪婪算法 每步均选择局部的最优解,重复此过程,最终即得到全局的最优解 简而言之就是每步都采用最优解 优点: 简单易行 缺点: 并非在所有情况下都奏效 经典的问题: 背包问题 集合覆盖问题 贪婪算法下的 ...