Docker Review - docker 容器 常用命令
文章目录
- 容器相关的命令
- 下载一个centos的基础镜像
- 新建容器并启动 docker run
- 操作说明
- 启动并进入容器
- 查看当前有哪些容器正在运行 docker ps
- 启动容器
- 停止容器
- 重启容器
- 强制停止
- 进入容器
- 退出容器
- 删除容器
- 删除所有停止的容器
- 其他常用命令
- 查看当前系统Docker信息
- 后台启动容器
- docker logs 查看日志
- docker top
- 查看镜像中的元数据 docker inspect
- 进入当前正在运行的容器
- 从容器内拷贝文件到主机上 docker cp
- 命令总览 docker help
容器相关的命令
先有个认知: 有镜像才能创建容器
下载一个centos的基础镜像
我们来看个例子 : 下载一个centos的基础镜像
[root@VM-0-7-centos ~]# docker pull centos
Using default tag: latest
latest: Pulling from library/centos
a1d0c7532777: Pull complete
Digest: sha256:a27fd8080b517143cbbbab9dfb7c8571c40d67d534bbdee55bd6c473f432b177
Status: Downloaded newer image for centos:latest
docker.io/library/centos:latest
[root@VM-0-7-centos ~]#
[root@VM-0-7-centos ~]#
[root@VM-0-7-centos ~]# docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
centos latest 5d0da3dc9764 2 weeks ago 231MB
[root@VM-0-7-centos ~]#
新建容器并启动 docker run
https://docs.docker.com/engine/reference/commandline/run/
操作说明
Option 太多了,看官文吧 ,这里挑几个常用的
$ docker run [OPTIONS] IMAGE [COMMAND] [ARG...]
# 参数说明
--name="Name" 容器名字 ,任意指定,用来区分容器
-d 后台方式运行
-it 使用交互方式运行,进入容器查看内容
-p 指定容器端口 -p 8080:8080-p ip:主机端口:容器端口-p 主机端口:容器端口 (常用)-p 容器端口容器端口-P 随机指定端口
启动并进入容器
[root@VM-0-7-centos ~]# docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
centos latest 5d0da3dc9764 2 weeks ago 231MB
[root@VM-0-7-centos ~]#
[root@VM-0-7-centos ~]## 启动并进入容器
[root@VM-0-7-centos ~]# docker run -it centos /bin/bash
[root@23e62436c0c5 /]# ls
bin dev etc home lib lib64 lost+found media mnt opt proc root run sbin srv sys tmp usr var
[root@23e62436c0c5 /]# pwd
/# 从容器中退回主机
[root@23e62436c0c5 /]# exit
exit
[root@VM-0-7-centos ~]# pwd
/root
[root@VM-0-7-centos ~]#
[root@VM-0-7-centos ~]#
查看当前有哪些容器正在运行 docker ps
https://docs.docker.com/engine/reference/commandline/ps/
# docker ps 显示正常运行的容器
-a # 显示当前正在运行的容器 + 历史运行过的容器
-n=? # 显示最近创建的容器
-q # 只显示容器的编号
[root@VM-0-7-centos ~]# 显示正常运行的容器
[root@VM-0-7-centos ~]# docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
[root@VM-0-7-centos ~]#
[root@VM-0-7-centos ~]# 显示当前正在运行的容器 + 历史运行过的容器
[root@VM-0-7-centos ~]# docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
23e62436c0c5 centos "/bin/bash" 3 minutes ago Exited (0) 3 minutes ago admiring_austin
95a5e684ea82 feb5d9fea6a5 "/hello" 44 hours ago Exited (0) 44 hours ago dazzling_davinci
[root@VM-0-7-centos ~]#
[root@VM-0-7-centos ~]#
[root@VM-0-7-centos ~]#
[root@VM-0-7-centos ~]# 查看帮助
[root@VM-0-7-centos ~]# docker ps --helpUsage: docker ps [OPTIONS]List containersOptions:-a, --all Show all containers (default shows just running)-f, --filter filter Filter output based on conditions provided--format string Pretty-print containers using a Go template-n, --last int Show n last created containers (includes all states) (default -1)-l, --latest Show the latest created container (includes all states)--no-trunc Don't truncate output-q, --quiet Only display container IDs-s, --size Display total file sizes
[root@VM-0-7-centos ~]# docker ps -n=1
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
23e62436c0c5 centos "/bin/bash" 4 minutes ago Exited (0) 4 minutes ago admiring_austin
[root@VM-0-7-centos ~]#
[root@VM-0-7-centos ~]#
[root@VM-0-7-centos ~]#
[root@VM-0-7-centos ~]# docker ps -aq
23e62436c0c5
95a5e684ea82
[root@VM-0-7-centos ~]#
启动容器
docker start container_name/container_id # 启动容器
https://docs.docker.com/engine/reference/commandline/start/
停止容器
https://docs.docker.com/engine/reference/commandline/stop/
docker stop container_name/container_id # 停止当前正在运行的容器
重启容器
docker restart container_name/container_id # 重启容器
https://docs.docker.com/engine/reference/commandline/restart/
强制停止
docker kill container_name/container_id # 强制停止当前容器
https://docs.docker.com/engine/reference/commandline/kill/
进入容器
后台启动一个容器后,如果想进入到这个容器,可以使用attach命令
docker attach container_name/container_id
https://docs.docker.com/engine/reference/commandline/attach/
退出容器
exit # 直接退出容器并停止
Ctrl + P + Q # 退出容器但是容器不停止
# 查看
[root@VM-0-7-centos ~]# docker ps 发现无运行的容器
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
[root@VM-0-7-centos ~]# docker run -it centos /bin/bash
[root@5fa6e10931b5 /]#
[root@5fa6e10931b5 /]# Ctrl + P + Q # 退出容器但是容器不停止
[root@VM-0-7-centos ~]#
[root@VM-0-7-centos ~]# 查看运行的容器
[root@VM-0-7-centos ~]# docker ps 发现容器并没有退出,区别于exit
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
5fa6e10931b5 centos "/bin/bash" 19 seconds ago Up 18 seconds agitated_pare
[root@VM-0-7-centos ~]#
[root@VM-0-7-centos ~]# 进入容器
[root@VM-0-7-centos ~]# docker attach 5fa6e10931b5
[root@5fa6e10931b5 /]#
[root@5fa6e10931b5 /]#
删除容器
https://docs.docker.com/engine/reference/commandline/rm/
docker rm container_name/container_id # 不能删除正在运行的容器
删除所有停止的容器
docker rm -f $(docker ps -a -q)
其他常用命令
查看当前系统Docker信息
https://docs.docker.com/engine/reference/commandline/info/
docker info
后台启动容器
[root@VM-0-7-centos ~]# docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
[root@VM-0-7-centos ~]# docker run -d centos
04abf017a5b00eb23707c07dc0d0d521d022bc9bba3d7a59d2aca855e87422c5
[root@VM-0-7-centos ~]# docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
[root@VM-0-7-centos ~]#
[root@VM-0-7-centos ~]# docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
问题docker ps ,发现 centos 停止了
docker 容器使用后台运行,就必须要有一个前台进程,docker发现没有应用,就自动停止
docker logs 查看日志
https://docs.docker.com/engine/reference/commandline/logs/
[root@VM-0-7-centos ~]# docker run --name test -d centos sh -c "while true; do $(echo date); sleep 1; done"
d0dd49e573ce117cdc6e8ea1c9a8648ef5927c6182bc4a2a189e16645e261bcc
[root@VM-0-7-centos ~]# docker logs -f --until=2s test
Wed Oct 6 12:31:43 UTC 2021
Wed Oct 6 12:31:44 UTC 2021
Wed Oct 6 12:31:45 UTC 2021
Wed Oct 6 12:31:46 UTC 2021
docker top
https://docs.docker.com/engine/reference/commandline/top/
[root@VM-0-7-centos ~]# docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
d0dd49e573ce centos "sh -c 'while true; …" About a minute ago Up About a minute test
3b68181c277f centos "/bin/bash" 6 minutes ago Up 6 minutes wizardly_hopper
[root@VM-0-7-centos ~]# docker top d0dd49e573ce
UID PID PPID C STIME TTY TIME CMD
root 24424 24405 0 20:31 ? 00:00:00 sh -c while true; do date; sleep 1; done
root 25067 24424 0 20:33 ? 00:00:00 /usr/bin/coreutils --coreutils-prog-shebang=sleep /usr/bin/sleep 1
[root@VM-0-7-centos ~]#
[root@VM-0-7-centos ~]#
[root@VM-0-7-centos ~]#
[root@VM-0-7-centos ~]#
[root@VM-0-7-centos ~]# docker top 3b68181c277f
UID PID PPID C STIME TTY TIME CMD
root 23338 23317 0 20:26 pts/0 00:00:00 /bin/bash
[root@VM-0-7-centos ~]#
查看镜像中的元数据 docker inspect
https://docs.docker.com/engine/reference/commandline/inspect/
[root@VM-0-7-centos ~]# docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
d0dd49e573ce centos "sh -c 'while true; …" 3 minutes ago Up 3 minutes test
3b68181c277f centos "/bin/bash" 8 minutes ago Up 8 minutes wizardly_hopper
[root@VM-0-7-centos ~]# docker inspect d0dd49e573ce
[{"Id": "d0dd49e573ce117cdc6e8ea1c9a8648ef5927c6182bc4a2a189e16645e261bcc","Created": "2021-10-06T12:31:43.01364583Z","Path": "sh","Args": ["-c","while true; do date; sleep 1; done"],"State": {"Status": "running","Running": true,"Paused": false,"Restarting": false,"OOMKilled": false,"Dead": false,"Pid": 24424,"ExitCode": 0,"Error": "","StartedAt": "2021-10-06T12:31:43.314744794Z","FinishedAt": "0001-01-01T00:00:00Z"},"Image": "sha256:5d0da3dc976460b72c77d94c8a1ad043720b0416bfc16c52c45d4847e53fadb6","ResolvConfPath": "/var/lib/docker/containers/d0dd49e573ce117cdc6e8ea1c9a8648ef5927c6182bc4a2a189e16645e261bcc/resolv.conf","HostnamePath": "/var/lib/docker/containers/d0dd49e573ce117cdc6e8ea1c9a8648ef5927c6182bc4a2a189e16645e261bcc/hostname","HostsPath": "/var/lib/docker/containers/d0dd49e573ce117cdc6e8ea1c9a8648ef5927c6182bc4a2a189e16645e261bcc/hosts","LogPath": "/var/lib/docker/containers/d0dd49e573ce117cdc6e8ea1c9a8648ef5927c6182bc4a2a189e16645e261bcc/d0dd49e573ce117cdc6e8ea1c9a8648ef5927c6182bc4a2a189e16645e261bcc-json.log","Name": "/test","RestartCount": 0,"Driver": "overlay2","Platform": "linux","MountLabel": "","ProcessLabel": "","AppArmorProfile": "","ExecIDs": null,"HostConfig": {"Binds": null,"ContainerIDFile": "","LogConfig": {"Type": "json-file","Config": {}},"NetworkMode": "default","PortBindings": {},"RestartPolicy": {"Name": "no","MaximumRetryCount": 0},"AutoRemove": false,"VolumeDriver": "","VolumesFrom": null,"CapAdd": null,"CapDrop": null,"CgroupnsMode": "host","Dns": [],"DnsOptions": [],"DnsSearch": [],"ExtraHosts": null,"GroupAdd": null,"IpcMode": "private","Cgroup": "","Links": null,"OomScoreAdj": 0,"PidMode": "","Privileged": false,"PublishAllPorts": false,"ReadonlyRootfs": false,"SecurityOpt": null,"UTSMode": "","UsernsMode": "","ShmSize": 67108864,"Runtime": "runc","ConsoleSize": [0,0],"Isolation": "","CpuShares": 0,"Memory": 0,"NanoCpus": 0,"CgroupParent": "","BlkioWeight": 0,"BlkioWeightDevice": [],"BlkioDeviceReadBps": null,"BlkioDeviceWriteBps": null,"BlkioDeviceReadIOps": null,"BlkioDeviceWriteIOps": null,"CpuPeriod": 0,"CpuQuota": 0,"CpuRealtimePeriod": 0,"CpuRealtimeRuntime": 0,"CpusetCpus": "","CpusetMems": "","Devices": [],"DeviceCgroupRules": null,"DeviceRequests": null,"KernelMemory": 0,"KernelMemoryTCP": 0,"MemoryReservation": 0,"MemorySwap": 0,"MemorySwappiness": null,"OomKillDisable": false,"PidsLimit": null,"Ulimits": null,"CpuCount": 0,"CpuPercent": 0,"IOMaximumIOps": 0,"IOMaximumBandwidth": 0,"MaskedPaths": ["/proc/asound","/proc/acpi","/proc/kcore","/proc/keys","/proc/latency_stats","/proc/timer_list","/proc/timer_stats","/proc/sched_debug","/proc/scsi","/sys/firmware"],"ReadonlyPaths": ["/proc/bus","/proc/fs","/proc/irq","/proc/sys","/proc/sysrq-trigger"]},"GraphDriver": {"Data": {"LowerDir": "/var/lib/docker/overlay2/ff23509532fdb929a71fc16b935635699b212284aad75b2ba1a98c12be9e8188-init/diff:/var/lib/docker/overlay2/75393e5cf278f83ef25913983a4eb3dfc84b59c157c393721f7b7287df241fe1/diff","MergedDir": "/var/lib/docker/overlay2/ff23509532fdb929a71fc16b935635699b212284aad75b2ba1a98c12be9e8188/merged","UpperDir": "/var/lib/docker/overlay2/ff23509532fdb929a71fc16b935635699b212284aad75b2ba1a98c12be9e8188/diff","WorkDir": "/var/lib/docker/overlay2/ff23509532fdb929a71fc16b935635699b212284aad75b2ba1a98c12be9e8188/work"},"Name": "overlay2"},"Mounts": [],"Config": {"Hostname": "d0dd49e573ce","Domainname": "","User": "","AttachStdin": false,"AttachStdout": false,"AttachStderr": false,"Tty": false,"OpenStdin": false,"StdinOnce": false,"Env": ["PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"],"Cmd": ["sh","-c","while true; do date; sleep 1; done"],"Image": "centos","Volumes": null,"WorkingDir": "","Entrypoint": null,"OnBuild": null,"Labels": {"org.label-schema.build-date": "20210915","org.label-schema.license": "GPLv2","org.label-schema.name": "CentOS Base Image","org.label-schema.schema-version": "1.0","org.label-schema.vendor": "CentOS"}},"NetworkSettings": {"Bridge": "","SandboxID": "8a50bb225a56d6a6d1a22a81d0800dab5a69a64c085854506efa7e32368f120d","HairpinMode": false,"LinkLocalIPv6Address": "","LinkLocalIPv6PrefixLen": 0,"Ports": {},"SandboxKey": "/var/run/docker/netns/8a50bb225a56","SecondaryIPAddresses": null,"SecondaryIPv6Addresses": null,"EndpointID": "cb85731792a00f6a5551deb0c9d014d77cd0b40d36280998858916f302c97379","Gateway": "172.18.0.1","GlobalIPv6Address": "","GlobalIPv6PrefixLen": 0,"IPAddress": "172.18.0.3","IPPrefixLen": 16,"IPv6Gateway": "","MacAddress": "02:42:ac:12:00:03","Networks": {"bridge": {"IPAMConfig": null,"Links": null,"Aliases": null,"NetworkID": "f35f03a9225f5e0d05a8c929f9f23f46f1b6fae73962b04c1b0c300f6d062681","EndpointID": "cb85731792a00f6a5551deb0c9d014d77cd0b40d36280998858916f302c97379","Gateway": "172.18.0.1","IPAddress": "172.18.0.3","IPPrefixLen": 16,"IPv6Gateway": "","GlobalIPv6Address": "","GlobalIPv6PrefixLen": 0,"MacAddress": "02:42:ac:12:00:03","DriverOpts": null}}}}
]
[root@VM-0-7-centos ~]#
进入当前正在运行的容器
https://docs.docker.com/engine/reference/commandline/exec/
# 命令 docker exec -it 容器id /bin/bash
方式一 docker exec
[root@VM-0-7-centos ~]# docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
d0dd49e573ce centos "sh -c 'while true; …" 6 minutes ago Up 6 minutes test
3b68181c277f centos "/bin/bash" 11 minutes ago Up 11 minutes wizardly_hopper# 进入容器
[root@VM-0-7-centos ~]# docker exec -it d0dd49e573ce /bin/bash
[root@d0dd49e573ce /]# ps -ef
UID PID PPID C STIME TTY TIME CMD
root 1 0 0 12:31 ? 00:00:00 sh -c while true; do date; sleep 1; done
root 813 0 0 12:38 pts/0 00:00:00 /bin/bash
root 839 1 0 12:38 ? 00:00:00 /usr/bin/coreutils --coreutils-prog-shebang=sleep /usr/bin/sleep 1
root 840 813 0 12:38 pts/0 00:00:00 ps -ef
[root@d0dd49e573ce /]#
方式二 docker attach
[root@VM-0-7-centos ~]# docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
d0dd49e573ce centos "sh -c 'while true; …" 9 minutes ago Up 9 minutes test
3b68181c277f centos "/bin/bash" 14 minutes ago Up 14 minutes wizardly_hopper
[root@VM-0-7-centos ~]# docker attach 3b68181c277f
[root@3b68181c277f /]#
[root@3b68181c277f /]#
[root@3b68181c277f /]# ps -ef
UID PID PPID C STIME TTY TIME CMD
root 1 0 0 12:26 pts/0 00:00:00 /bin/bash
root 15 1 0 12:41 pts/0 00:00:00 ps -ef
[root@3b68181c277f /]#
[root@3b68181c277f /]#
从容器内拷贝文件到主机上 docker cp
https://docs.docker.com/engine/reference/commandline/cp/
命令 docker cp 容器id:容器内路径 目的的主机路径
[root@VM-0-7-centos ~]# docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
d0dd49e573ce centos "sh -c 'while true; …" 9 minutes ago Up 9 minutes test
3b68181c277f centos "/bin/bash" 14 minutes ago Up 14 minutes wizardly_hopper
[root@VM-0-7-centos ~]# docker attach 3b68181c277f
[root@3b68181c277f /]#
[root@3b68181c277f /]#
[root@3b68181c277f /]# ps -ef
UID PID PPID C STIME TTY TIME CMD
root 1 0 0 12:26 pts/0 00:00:00 /bin/bash
root 15 1 0 12:41 pts/0 00:00:00 ps -ef
[root@3b68181c277f /]#
[root@3b68181c277f /]# pwd
/
[root@3b68181c277f /]# ls
bin dev etc home lib lib64 lost+found media mnt opt proc root run sbin srv sys tmp usr var# 在容器的根目录 / 创建一个文件 artisan.log
[root@3b68181c277f /]# touch artisan.log
[root@3b68181c277f /]#[root@3b68181c277f /]# ls artisan.log
artisan.log
[root@3b68181c277f /]# pwd
/# 退出容器
[root@3b68181c277f /]# exit
exit# 宿主机上执行 docker cp 将容器内/artisan.log 拷贝到 宿主机的/root目录下
[root@VM-0-7-centos ~]# docker cp 3b68181c277f:/artisan.log /root
[root@VM-0-7-centos ~]# 查看copy的文件
[root@VM-0-7-centos ~]# cd /root
[root@VM-0-7-centos ~]# ls
artisan.log helloboot-0.0.1-SNAPSHOT.conf helloboot-0.0.1-SNAPSHOT.jar soft
[root@VM-0-7-centos ~]# ll artisan.log
-rw-r--r-- 1 root root 0 Oct 6 20:42 artisan.log
[root@VM-0-7-centos ~]#
命令总览 docker help
[root@VM-0-7-centos ~]# docker helpUsage: docker [OPTIONS] COMMANDA self-sufficient runtime for containersOptions:--config string Location of client config files (default "/root/.docker")-c, --context string Name of the context to use to connect to the daemon (overrides DOCKER_HOST env var and default contextset with "docker context use")-D, --debug Enable debug mode-H, --host list Daemon socket(s) to connect to-l, --log-level string Set the logging level ("debug"|"info"|"warn"|"error"|"fatal") (default "info")--tls Use TLS; implied by --tlsverify--tlscacert string Trust certs signed only by this CA (default "/root/.docker/ca.pem")--tlscert string Path to TLS certificate file (default "/root/.docker/cert.pem")--tlskey string Path to TLS key file (default "/root/.docker/key.pem")--tlsverify Use TLS and verify the remote-v, --version Print version information and quitManagement Commands:app* Docker App (Docker Inc., v0.9.1-beta3)builder Manage buildsbuildx* Build with BuildKit (Docker Inc., v0.6.1-docker)config Manage Docker configscontainer Manage containerscontext Manage contextsimage Manage imagesmanifest Manage Docker image manifests and manifest listsnetwork Manage networksnode Manage Swarm nodesplugin Manage pluginsscan* Docker Scan (Docker Inc., v0.8.0)secret Manage Docker secretsservice Manage servicesstack Manage Docker stacksswarm Manage Swarmsystem Manage Dockertrust Manage trust on Docker imagesvolume Manage volumesCommands:attach Attach local standard input, output, and error streams to a running containerbuild Build an image from a Dockerfilecommit Create a new image from a container's changescp Copy files/folders between a container and the local filesystemcreate Create a new containerdiff Inspect changes to files or directories on a container's filesystemevents Get real time events from the serverexec Run a command in a running containerexport Export a container's filesystem as a tar archivehistory Show the history of an imageimages List imagesimport Import the contents from a tarball to create a filesystem imageinfo Display system-wide informationinspect Return low-level information on Docker objectskill Kill one or more running containersload Load an image from a tar archive or STDINlogin Log in to a Docker registrylogout Log out from a Docker registrylogs Fetch the logs of a containerpause Pause all processes within one or more containersport List port mappings or a specific mapping for the containerps List containerspull Pull an image or a repository from a registrypush Push an image or a repository to a registryrename Rename a containerrestart Restart one or more containersrm Remove one or more containersrmi Remove one or more imagesrun Run a command in a new containersave Save one or more images to a tar archive (streamed to STDOUT by default)search Search the Docker Hub for imagesstart Start one or more stopped containersstats Display a live stream of container(s) resource usage statisticsstop Stop one or more running containerstag Create a tag TARGET_IMAGE that refers to SOURCE_IMAGEtop Display the running processes of a containerunpause Unpause all processes within one or more containersupdate Update configuration of one or more containersversion Show the Docker version informationwait Block until one or more containers stop, then print their exit codesRun 'docker COMMAND --help' for more information on a command.To get more help with docker, check out our guides at https://docs.docker.com/go/guides/
[root@VM-0-7-centos ~]#
https://docs.docker.com/engine/reference/run/
Docker Review - docker 容器 常用命令相关推荐
- Docker 学习笔记(Docker 架构 / 镜像 / 容器 / 常用命令 / Dockerfile / 镜像仓库)
Docker 1. Docker 入门 1.1 Docker 是什么 1.2 Docker 和 虚拟机 1.3 镜像 容器 仓库 1.4 Docker 架构 1.5 Docker 安装 1.6 doc ...
- Docker镜像和容器常用命令
一..Docker帮助命令 1.显示docker的版本信息 docker version 2.显示docker的系统信息,包括镜像和容器的数量 docker info 3.docker帮助命令 doc ...
- docker镜像、容器 常用命令,容器端口映射
文章目录 前言 一.docker基础命令 二.docker镜像命令 1.docker images:列出本地主机的镜像 2. docker search :查看镜像 3.docker pull:拉取镜 ...
- docker环境安装,镜像和容器常用命令
docker学习笔记 1 docker环境安装 1.1 安装yum-utils yum install -y yum-utils device-mapper-persistent-data lvm2 ...
- docker之容器常用命令及基本操作
docker之容器常用命令及基本操作 文章目录 docker之容器常用命令及基本操作 一.查看容器 `docker ps`常用选项 二.查看容器日志 `docker logs`命令选项 三.运行容器 ...
- docker 容器常用命令及基本操作
docker之容器常用命令及基本操作 一.查看容器 ps:该子命令能查看当前正在运行的容器 示例: [root@localhost ~ ]# docker ps CONTAINER ID IMAGE ...
- docker配置阿里云镜像加速、镜像和容器常用命令、docker镜像原理
6. Docker 配置阿里镜像加速服务 6.1 docker 运行流程 6.2 docker配置阿里云镜像加速 查看自己的镜像加速地址(链接直达):https://cr.console.aliyun ...
- Linux 设置Docker容器开机自启动,Dokcer容器常用命令总结。
文章目录 Linux Dokcer容器常用命令总结 一.docker 常用基础命令总结 二.工作中常用docker命令 三.查看容器挂载目录 四.容器拷贝文件 五.设置搭建好容器开机自启 六.开启do ...
- Docker(一):Docker的安装与常用命令
相关阅读: Docker(一):Docker的安装与常用命令 Docker(二):Docker常用命令之镜像的创建:Dockerfile 与 commit Docker(三):Docker镜像导入与导 ...
- Linux下docker的安装及常用命令
docker主要是用来管理像MySQL.Tomcat.Nginx等软件的,在安装docker之前,首先保证你的系统里没有老版本docker 清除老版本docker,命令过长,用 \ 分行 sudo y ...
最新文章
- 【五线谱】拍号与音符时值 ( 五线谱拍号 | 全音符休止符 | 二分音符休止符 | 四分音符休止符 | 八分音符休止符 | 十六分音符休止符 | 三十二分音符休止符 )
- 用户手撕锤子产品总监引10万人围观,竟还拿到了Offer
- 微软、UIUC韩家炜组联合出品:少样本NER最新综述
- linux词语大全,简单词语大全二字学习软件-简单词语大全四字下载v1.5.3-Linux公社...
- 说说对javaee中的session的理解
- 商标注册流程与注意事项 logo 商标注册类型分类解释
- 垃圾回收中的finalize方法
- php 表单提交渲染问题,如何解决php表单提交的数据丢失的问题
- 二进制十六进制转换表
- 有什么好用的电脑录音软件?
- python程序文件默认扩展名_Python程序文件的扩展名是:
- 决策树---红酒分类
- mysql5.7 主从切换_mysql5.7主从切换(master/slave switchover)
- 嵌入式物联网项目实践1.1
- C# GDAL 数字图像处理Part10 自动配准/半自动配准
- 魔兽世界联盟物价稳定的服务器,魔兽世界怀旧服NAXX物价惊到隔壁玩家:堕落的灰烬使者210W...
- 纳米软件之通信设备自动测试系统
- android脚本 附近的人,前天微信上有个附近的人加我,我发现她是个脚本
- 操作系统的作用是什么?目前主流的操作系统有哪些?主要特点是什么?
- pnpm(Run “pnpm setup“ to create it automatically, or set the global-bin-dir setting, or the PNPM_HO)
热门文章
- 有没有插件_这 10 款插件让你的 GitHub 更好用、更有趣
- vue中弹窗input框聚焦_Vue 中如何让 input 聚焦?(包含视频讲解)
- C++友元函数和友元类(一)
- python 递归方式实现斐波那契数列
- TensorFlow莫烦 placehoder (三)
- ceph编译_Ceph编译:L版本及其之后的版本
- python中api是指什么_python中API接口是什么
- 《程序员代码面试指南第二版》Python实现(个人读书笔记)
- 强化学习笔记 DDPG (Deep Deterministic Policy Gradient)
- tensorflow从入门到精通100讲(二)-IRIS数据集应用实战