1:阿里云docker仓库 https://dev.aliyun.com/search.html

2:进去注册帐号后,点击自己的管理中心。

3:在管理中心点击加速器,右边面板会有你的加速地址,右边面板下面有详细设置步骤。

安装/升级你的Docker客户端

推荐安装1.10.0以上版本的Docker客户端。

您可以通过阿里云的镜像仓库下载:docker-enginedocker-ce

或执行以下命令:

curl -sSL http://acs-public-mirror.oss-cn-hangzhou.aliyuncs.com/docker-engine/internet | sh -

如何使用Docker加速器

针对Docker客户端版本大于1.10的用户

您可以通过修改daemon配置文件/etc/docker/daemon.json来使用加速器:

sudo mkdir -p /etc/docker
sudo tee /etc/docker/daemon.json <<-'EOF'
{
"registry-mirrors": ["https://o3trwnyj.mirror.aliyuncs.com"]
}
EOF
sudo systemctl daemon-reload
sudo systemctl restart docker

以下代码用于检测你有没有开启加速器

sudo  ps -ef | grep
root 17825 1 0 16:50 ? 00:00:11 /usr/bin/dockerd --registry-mirror=https://no1pfk8z.mirror.aliyuncs.com --registry-mirror=https://no1pfk8z.mirror.aliyuncs.com --registry-mirror=https://n42ocvxt.mirror.aliyuncs.com --raw-logs
  • 1
  • 2

有如上的信息输出代表你已经成功了

4:使用commit构建镜像,执行命令

 docker pull centos:latest
sudo docker run -it -p 80 --name willian centos /bin/bash
  • 1
  • 2

在bash安装所需要的运行的环境

 sudo docker commit -a 'ss' willian willian/java8
  • 1

将镜像提交到本地仓库

sudo docker images
  • 1

这时可以看到你自己的镜像

  $ sudo docker login --username=willian19960118 registry.cn-hangzhou.aliyuncs.com
  • 1
  • 2

给阿里云仓库打tag

  $ sudo docker tag [ImageId] registry.cn-hangzhou.aliyuncs.com/willianevils/zhangweilun:[镜像版本号]
  • 1
  • 2

push

$ sudo docker push registry.cn-hangzhou.aliyuncs.com/willianevils/zhangweilun:[镜像版本号]

docker使用阿里云镜像仓库的更多相关文章

  1. Docker通过阿里云镜像仓库使用Gitlab_CI部署SpringBoot项目

    Docker.Gitlab.阿里云镜像仓库.SpringBoot的相关安装.搭建这里就不讲了. Linux 安装 Docker :https://www.cnblogs.com/linnuo/p/15 ...

  2. docker使用阿里云镜像仓库docker

    1:阿里云docker仓库 https://dev.aliyun.com/search.html 2:进去注册帐号后,点击自己的管理中心. 3:在管理中心点击加速器,右边面板会有你的加速地址,右边面板 ...

  3. 通过docker把本地AspNetCore WebAPI镜像打包到阿里云镜像仓库并在centos部署

    在centos上安装docker # step 1: 安装必要的一些系统工具 sudo yum install -y yum-utils device-mapper-persistent-data l ...

  4. 设置阿里云镜像仓库并安装Docker

    echo "设置阿里云镜像仓库" mkdir /etc/yum.repos.d/bak && mv /etc/yum.repos.d/*.repo /etc/yum ...

  5. 使用阿里云镜像仓库构建国外 Docker 镜像

    使用阿里云镜像仓库下载国外镜像 在日常使用 Docker 或 K8S 的过程中,经常会需要到国外的网站中下载镜像,但是有些网站在国内是无法访问的.对于这个问题可以使用阿里云提供的镜像仓库进行下载,然后 ...

  6. 两种github action 打包.Net Core 项目docker镜像推送到阿里云镜像仓库

    两种github action 打包.Net Core 项目docker镜像推送到阿里云镜像仓库 1.GitHub Actions 是什么? 大家知道,持续集成由很多操作组成,比如抓取代码.运行测试. ...

  7. Jib插件构建镜像push到阿里云镜像仓库

    一.前言 Jib:Google开源的Java容器化工具 可作为插件快速集成到项目中,构建镜像,实现 Java 应用容器化 下面贴出一张从网上看到的Jib描述~ 二.利用Jib插件构建镜像push到阿里 ...

  8. 构建一个java环境的centos系统镜像并上传到阿里云镜像仓库

    编辑dockerfile 文件 FROM centos MAINTAINER zhaoweifeng ENV LANG en_US.UTF-8 RUN /bin/cp /usr/share/zonei ...

  9. Ubuntu-16.04下Docker通过阿里云镜像安装(apt-get)

    由于通过官方路径安装docker时总是连接不上,所以从网上找了半天,通过阿里云镜像安装docker,我的Linux是ubuntu-16.04 一.配置源里的阿里云镜像仓库 sudo vim /etc/ ...

随机推荐

  1. c语言中怎样用scanf()读入带空格的字符串?

    楼主 发表于: 2011-01-14 15:39:55 #include <stdio.h> int main(void){ int i; char a[5]; scanf("% ...

  2. 零基础学python-5.4 数字精度与复数

    1.整数精度 这里我们对照一下python2.7与python3.4的整数精度 watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQv/font/5a6L5L2T/ ...

  3. Python sql注入 过滤字符串的非法字符

    #coding:utf8 #在开发过程中,要对前端传过来的数据进行验证,防止sql注入攻击,其中的一个方案就是过滤用户传过来的非法的字符 def sql_filter(sql, max_length= ...

  4. linux CentOs 权限导致的Apache - "DocumentRoot must be a directory"的解决方案

    在配置apache服务时经常遇到DocumentRoot must be a directory的错误提示,刚接触到apache时折腾了几个小时才找到错误的原因,出现这样的错误一般都是由于selinu ...

  5. iOS中Storyboard使用要点记录

    摘要: Storyboard的使用与原本单个xib文件的使用还是有些不同的,于习惯上会有些出入.在这里记下遇到的要点. 1.将第一个ViewController用设置成NavigationContro ...

  6. Linux进程间通信的几种方式总结--linux内核剖析(七)

    进程间通信概述 进程通信的目的 传输数据 一个进程须要将它的数据发送给还有一个进程.发送的数据量在一个字节到几M字节之间 共享数据 多个进程想要操作共享数据,一个进程对共享数据 通知事 一个进程须要向 ...

  7. cocos2d-x实例学习之常用类及其概要作用

    CCLayer,CCScene CCLayer类对应cocos2d-x引擎里的布景.每个游戏场景中都可以有很多层,每一层负责各自的任务,例如专门负责显示背景.专门负责显示道具和专门负责显示人物角色等. ...

  8. 452. Remove Linked List Elements【Naive】

    Remove all elements from a linked list of integers that have value val. Example Given 1->2->3- ...

  9. Spring Boot与Spring Security整合后post数据不了,403拒绝访问

    http://blog.csdn.net/sinat_28454173/article/details/52251004 *************************************** ...

  10. 解决Error: That port is already in use.

    ubuntu系统下,运行一个django项目,即输入python manage.py runserver后,可能出现 Error: That port is already in use.的错误. 即 ...