4-Docker命令之docker tag

1.docker tag介绍

docker tag命令是用来给docker镜像打标签

2.docker tag用法

docker tag SOURCE_IMAGE:TAG TARGET_IMAGE:TAG

复制代码
[root@centos79 ~]# docker tag --help

Usage:  docker tag SOURCE_IMAGE[:TAG] TARGET_IMAGE[:TAG]

Create a tag TARGET_IMAGE that refers to SOURCE_IMAGE

Aliases:
  docker image tag, docker tag
[root@centos79 ~]# 

3.实例

3.1.docker镜像打标签

命令:

docker tag nginx:latest nginx:1.0

复制代码
[root@centos79 ~]# docker images | grep nginx
nginx                                latest        605c77e624dd   23 months ago   141MB
[root@centos79 ~]# docker tag nginx:latest nginx:1.0
[root@centos79 ~]# docker images | grep nginx
nginx                                1.0           605c77e624dd   23 months ago   141MB
nginx                                latest        605c77e624dd   23 months ago   141MB
[root@centos79 ~]# 
相关推荐
早茶cc21 分钟前
Docker php文件包含
docker·php
吴声子夜歌7 小时前
Kubernetes进阶实战——Pod资源调度(三)
云原生·容器·kubernetes
Techblog of HaoWANG8 小时前
具身智能机器人专题(4) Docker 实战
linux·运维·ubuntu·docker·容器·机器人·ollama
墨痕诉清风10 小时前
docker无法pull镜像问题解决
运维·docker·容器
东鹏特饮13 小时前
Docker 容器技术详细指南
运维·docker·容器
吴声子夜歌16 小时前
Kubernetes进阶实战——网络模型与网络策略(二)
网络·容器·kubernetes
开发者导航16 小时前
Tabby 教程:Docker 部署自托管 AI 编码助手
人工智能·docker·容器
吴声子夜歌16 小时前
Kubernetes进阶实战——Pod资源调度(二)
云原生·容器·kubernetes
Java码农也是农17 小时前
Docker 入门与实战:镜像、容器、数据卷和网络,用 Spring Cloud 部署讲清楚
网络·spring cloud·docker
weixin_4352470618 小时前
医疗系统容器化后,K8s 发布要重做的4个取舍
云原生·容器·kubernetes