003_如何正确的进入容器
Posted arun
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了003_如何正确的进入容器相关的知识,希望对你有一定的参考价值。
一、
$ docker exec -it ele_zookeeper /bin/bash
二、
参考nsenter git地址=>https://github.com/jpetazzo/nsenter
arun:tmp arunyang$ docker run --rm jpetazzo/nsenter cat /nsenter > /tmp/nsenter && chmod +x /tmp/nsenter Unable to find image ‘jpetazzo/nsenter:latest‘ locally latest: Pulling from jpetazzo/nsenter 5c90d4a2d1a8: Pulling fs layer .......... 0c4337c5a938: Pulling fs layer 72024cea4c47: Waiting .......... 0c4337c5a938: Waiting c6c4c486dd77: Verifying Checksum c6c4c486dd77: Download complete .......... c6c4c486dd77: Pull complete 23f698ff1fd0: Download complete b39fba43fbdb: Verifying Checksum .......... 0ed6ac9f06ed: Pull complete .......... Digest: sha256:a30e7da907a9abb715027677c21468005beee06251b7737c86f84fa148d572b0 Status: Downloaded newer image for jpetazzo/nsenter:latest
arun:bin arunyang$ mv /tmp/nsenter /usr/local/bin/
以上是关于003_如何正确的进入容器的主要内容,如果未能解决你的问题,请参考以下文章