启动 docker,漏加 16020 端口,怎么修改呢? 1. Docker ps 看一下id CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 9db7b1c85749 harisekhon/hbase:1.3 "/entrypoint.sh" 3 days ago Up 8 minutes 0.0.0.0:2181->2181/tcp, 0.0.0.0:8080->8080/tcp, 0.0.0.0:8085->8085/tcp, 0.0.0.0:9090->9090/tcp, 0.0.0.0:9095->9095/tcp, 0.0.0.0:16000->16000/tcp, 0.0.0.0:16010->16010/tcp, 0.0.0.0:16020->16020/tcp, 0.0.0.0:16030->16030/tcp, 0.0.0.0:16201->16201/tcp, 0.0.0.0:16301->16301/tcp hbase # id为 9db7b1c85749 2. 停止docker docker stop hbase # 如果运行中,一旦关闭,修改会失效,所以操作之前,必须先停止 3. MAC用虚拟机,所以要先进入虚拟机 cd ~/Library/Containers/com.docker.docker/Data/vms/0 ls 00000002.000005f4 00000002.00001001 00000003.000005f5 Docker.raw connect guest.00000948 hyperkit.pid nic1.uuid 00000002.00001000 00000002.0000f3a5 00000003.00000948 config.iso guest.000005f5 hyperkit.json log tty screen tty 4. 进入容器目录 cd /var/lib/docker/containers cd 9db7b1c85749 开头的目录 # (1) 修改 hostconfig.json # (2) 修改 config.v2.json # 修改完毕后,退出 halt 5. 重启 Docker
MAC docker启动参数修改
点赞
收藏