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 ~]# 
相关推荐
tonngw3 小时前
【Mac 从 0 到 1 保姆级配置教程 16】- Docker 快速安装配置、常用命令以及实际项目演示
macos·docker·容器·开源·github·docker desktop·orbstack
debug 小菜鸟5 小时前
浏览器访问 AWS ECS 上部署的 Docker 容器(监听 80 端口)
docker·云计算·aws
SpikeKing6 小时前
Server - 使用 Docker 配置 PyTorch 研发环境
pytorch·docker·llm
斯普信云原生组7 小时前
Docker构建自定义的镜像
java·spring cloud·docker
2201_761199047 小时前
k8s4部署
云原生·容器·kubernetes
小柏ぁ8 小时前
calico/node is not ready: BIRD is not ready: BGP not established with xxx
运维·docker·kubernetes
三劫散仙9 小时前
kubernetes jenkins pipeline优化拉取大仓库性能指定分支+深度
容器·kubernetes·jenkins
西京刀客9 小时前
k8s热更新-subPath 不支持热更新
云原生·容器·kubernetes·configmap·subpath
weixin_434936289 小时前
k8S 命令
linux·容器·kubernetes
nuczzz12 小时前
GPU虚拟化
docker·kubernetes·k8s·gpu·nvidia