【docker】docker和镜像仓库

阿里云镜像仓库(Aliyun Container Registry)是阿里云提供的容器镜像存储和管理服务。它以Docker Registry协议为基础,为容器开发者提供了稳定可靠的镜像存储和分发服务。

使用阿里云镜像仓库,您可以将自己的Docker镜像推送到阿里云,实现镜像的统一管理和分发。同时,阿里云镜像仓库还提供了丰富的功能,如镜像版本管理、镜像权限控制、镜像自动构建等,方便您管理和使用镜像。

使用阿里云镜像仓库,您可以享受到阿里云提供的高可用、高性能的存储和分发能力,大大提高了容器应用的部署效率和稳定性。

1、搭建自己的阿里云镜像仓库

(1)、登录阿里云控制台,在产品列表中选择"容器镜像服务"。

(2)、进入"容器镜像服务"页面,点击"创建命名空间",填写命名空间名称并创建。

(3)、进入命名空间详情页,点击"创建仓库",填写仓库名称并创建。

(4)、在仓库详情页中,可以查看仓库的地址和凭证信息。

2、上传一个已下载的镜像到阿里云镜像仓库

(1). 登录阿里云Docker Registry

bash 复制代码
 docker login --username=shiinanamida registry.cn-hangzhou.aliyuncs.com

用于登录的用户名为阿里云账号全名,密码为开通服务时设置的密码。

bash 复制代码
docker tag d2c94e258dcb registry.cn-hangzhou.aliyuncs.com/shiina_space/shiina:hello
docker push registry.cn-hangzhou.aliyuncs.com/shiina_space/shiina:hello


3、从镜像仓库下载一个镜像

bash 复制代码
docker pull registry.cn-hangzhou.aliyuncs.com/shiina_space/shiina:hello

4、将从阿里镜像仓库下载下来的镜像打成tar包存在/opt目录下

bash 复制代码
docker save -o /opt/hello.tar registry.cn-hangzhou.aliyuncs.com/shiina_space/shiina:hello

5、启动该容器并且进入,在root目录下创建一个文件,退出容器

bash 复制代码
docker start linux        
docker exec -it linux /bin/bash
cd ~
touch 1
相关推荐
艾伦_耶格宇20 分钟前
【ACP】阿里云云计算高级运维工程师--ACP
运维·阿里云·云计算
FrankYoou1 小时前
Jenkins 与 GitLab CI/CD 的核心对比
java·docker
一位摩羯座DBA1 小时前
Redhat&Centos挂载镜像
linux·运维·centos
学习3人组1 小时前
CentOS配置网络
linux·网络·centos
隆里卡那唔1 小时前
在dify中通过http请求neo4j时为什么需要将localhost变为host.docker.internal
http·docker·neo4j
疯子的模样1 小时前
Docker 安装 Neo4j 保姆级教程
docker·容器·neo4j
weixin_307779131 小时前
Hive集群之间迁移的Linux Shell脚本
大数据·linux·hive·bash·迁移学习
漫步企鹅2 小时前
【蓝牙】Linux Qt4查看已经配对的蓝牙信息
linux·qt·蓝牙·配对
cui_win2 小时前
【网络】Linux 内核优化实战 - net.core.flow_limit_table_len
linux·运维·网络
梦在深巷、2 小时前
MySQL/MariaDB数据库主从复制之基于二进制日志的方式
linux·数据库·mysql·mariadb