本文共 1165 字,大约阅读时间需要 3 分钟。
本文使用的环境是:
erichan@ubuntu14_04_1-pd:~/docker-tars$ d load -i nsenter.tarerichan@ubuntu14_04_1-pd:~/docker-tars$ d run -v /usr/local/bin:/target jpetazzo/nsenter
erichan@ubuntu14_04_1-pd:~/docker-tars$ d run -v /usr/local/bin:/target jpetazzo/nsenterInstalling nsenter to /targetInstalling docker-enter to /target
erichan@ubuntu14_04_1-pd:~/docker-tars$ PID=$(d inspect --format { {.State.Pid}} sinopia)
sinopia 是运行中的容器进程的别名
erichan@ubuntu14_04_1-pd:~/docker-tars$ sudo nsenter --target $PID --mount --uts --ipc --net --pid
root@5b03fb519385:/# ls /opt/sinopia/config.yaml config_gen.js start.sh storageroot@5b03fb519385:/# cat /opt/sinopia/config.yaml | grep allow# Maximum amount of users allowed to register, defaults to "+inf". # allow_access: admin # allow_publish: all # allow all users to read packages ('all' is a keyword) allow_access: all # allow 'admin' to publish packages allow_publish: allroot@5b03fb519385:/# cat /opt/sinopia/config.yaml | grep listen# you can specify listen address (or simply a port)listen: 0.0.0.0:4873
转载地址:http://rtkja.baihongyu.com/