docker打开redis 配置
docker ps --罗列出所有的镜像 CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 05f28876c626 dockerfiles:dev "bash" 2 hours ago Up 2 hours 90/tcp, 444/tcp charming_brahmagupta ff97798e1a41 redis "docker-entrypoint.s…" 3 hours ago Up 3 hours 0.0.0.0:3680->3680/tcp, :::3680->3680/tcp, 6379/tcp redis c7875bd363f1 redis:latest "docker-entrypoint.s…" 3 hours ago Up 3 hours 6379/tcp trusting_brattain 3ec528d9aaa3 rabbitmq:management "docker-entrypoint.s…" 3 hours ago Up 3 hours 4369/tcp, 5671-5672/tcp, 15671-15672/tcp, 15691-15692/tcp, 25672/tcp xenodochial_hypatia docker exec -it ff97 bash --进去到这这个文件夹里 root@ff97798e1a41:/data# ls appendonly.aof root@ff97798e1a41:/# ls --查看这下root@ff97798e1a41:下都有神马文件 bin boot data dev etc home lib lib64 media mnt opt proc root run sbin srv sys tmp usr var
进入容器
ocker exec -it 容器名称 /bin/bash # eg:进入一个叫konga的容器 docker exec -it konga /bin/bash # 在容器中执行了一个ping命令 ping 127.0.0.1 # 退出当前容器 exit
6.8.1 容器文件位置 cd /var/lib/docker/containers
人各有命,上天注定,有人天生为王,有人落草为寇。脚下的路,如果不是你自己的选择,那么旅程的终点在哪,也没人知道。你会走到哪,会遇到谁,都不一定。