我的docker常用命令

tech2024-01-30  88

#查看版本 [root@centos66 ~]# docker version #查看docker更多信息 [root@centos66 ~]# docker info #看镜像 [root@centos66 ~]# docker images REPOSITORY TAG IMAGE ID CREATED SIZE menglingzhi/new-api-gateway 2.0.3 342660e7c6c5 About an hour ago 283MB smart/new-api-gateway 2.0.3 342660e7c6c5 About an hour ago 283MB smart/new-api-gateway latest 342660e7c6c5 About an hour ago 283MB openjdk 8-jdk-alpine a3562aa0b991 16 months ago 105MB [root@centos66 ~]# docker tag smart/new-api-gateway menglingzhi/new-api-gateway:2.0.3 #运行镜像 [root@centos66 ~]# docker run -itd smart/new-api-gateway:latest #看运行的镜像 [root@centos66 ~]# docker ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 0573ed9ebead smart/new-api-gateway:latest "sh -c 'java $JAVA_O…" 32 minutes ago Up 32 minutes dreamy_bouman ae5f9c044ad0 499734f11656 "/bin/sh" About an hour ago Up About an hour wonderful_gagarin 3ceb7b58148b a3562aa0b991 "/bin/sh" 2 hours ago Up 2 hours modest_margulis [root@centos66 ~]# docker exec -it wonderful_gagarin /bin/sh #提交到dockerhub [root@centos66 ~]# docker login [root@centos66 ~]# docker push menglingzhi/new-api-gateway:2.0.3

 

最新回复(0)