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

 

posted @ 2021-09-11 18:41  ProZkb  阅读(358)  评论(0编辑  收藏  举报