在虚拟机上安装完成Jumpserver后。后来将VM迁移到另一个网段,分配了新的地址,发现ssh 2222 被拒绝
refuse...
docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
6945b7e2130d jumpserver/jms_guacamole:2.0.2 "./entrypoint.sh" 4 days ago Up 8 minutes 127.0.0.1:8081->8080/tcp jms_guacamole
5f582de38c7d jumpserver/jms_koko:2.0.2 "./entrypoint.sh" 4 days ago Up 8 minutes 0.0.0.0:2222->2222/tcp, 127.0.0.1:5000->5000/tcp jms_koko
docker exec -it jms_koko /bin/bash```
cd /opt/koko
more config.yml
# Jumpserver项目的url, api请求注册会使用
CORE_HOST: http://172.31.0.254:8080
还是原来的地址
修改后重启,依然不通
查了一通
#vi ~/.bashrc
export CORE_HOST=http://IP:8080
无效
cd /var/lib/docker/containers/5f582de38c7da25a51ae5b9ddc48cf9f31633bda6e3062fd90133897897ba93a
more config.v2.json
...["CORE_HOST=http://172.31.0.254:8080","...
还是原来的地址
vi config.v2.json
修改后
docker restart jms_koko
依然,崩溃
查到
https://github.com/moby/moby/issues/8838#issuecomment-117284347
I found a solution... You just stop docker daemon and change container config in
/var/lib/docker/containers/[container-id]/config.json
I also tried to do this with just docker container reseting but file seems to be rewriten on each start.
This is just a temporary solution (I hope), since, I do not want to stop all containers just to modify one...
You can find container-id by executing
systemctl stop docker
vi /var/lib/docker/<docker-id>/config.v2.json
systemctl start docker
docker start jms_koko
done
对于jms_guacamole同样的操作