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& ...
随机推荐
- jquery.zclip.js粘贴功能
jquery的粘贴插件: 如下是代码: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> ...
- TopCoder SRM500 Div1 1000 其他
原文链接https://www.cnblogs.com/zhouzhendong/p/SRM500-1000.html SRM500 Div1 1000 设 \(v_1,v_2,\cdots ,v_9 ...
- Enrolment注册插件
自moodle2.0注册插件必须继承 lib/enrollib.php的 enrol_plugin 抽象类:这个基类包含所有标准方法和开发人员文档 课程注册信息存储在enrol和user_enrol ...
- 洛谷 P3370 字符串哈希 (模板)
<题目链接> <转载于 >>> > 题目描述 如题,给定N个字符串(第i个字符串长度为Mi,字符串内包含数字.大小写字母,大小写敏感),请求出N个字符串中共 ...
- PostgreSQL 调用存储过程返回结果集
创建返回结果集类型的存储过程: CREATE OR REPLACE FUNCTION public.f_get_member_info( id integer, productname charact ...
- 从小白到区块链工程师:第一阶段:Go语言环境的搭建(1)
一,Golang语言简介 2009年由谷歌公司推出,由C语言之父Ken Thompson主导研发.Go(又称Golang)是Google开发的一种静态强类型.编译型.并发型,并具有垃圾回收功能的编程语 ...
- Kafka、RabbitMQ、RocketMQ等消息中间件的对比 —— 消息发送性能和区别
https://blog.csdn.net/yunfeng482/article/details/72856762
- 按字典序依次打印只由1~n组成的n位数
//我的dfs入门.将1~n一次填入数组然后打印. #include<stdio.h> #include<string.h> ]; ]; void dfs(int,int); ...
- Redis中的哈希(Hash)
Redis 哈希(Hash) Redis hash 是一个string类型的field和value的映射表,hash特别适合用于存储对象. Redis 中每个 hash 可以存储 232 - 1 键值 ...
- IntelliJ IDEA classpath包含哪些文件夹以及如何把文件(夹)添加到classpath下
在IDEA中,标为蓝色的文件夹被认定为包含在classpath中,例如上图中的resources.src文件夹.把文件位置以"classpath:applicationContext.xml ...