New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

如何进入这个容器? #9

Closed
kevien opened this Issue Jun 25, 2017 · 5 comments

Comments

Projects
None yet
3 participants
@kevien
Copy link

kevien commented Jun 25, 2017

如题

@Medicean

This comment has been minimized.

Copy link
Owner

Medicean commented Jun 26, 2017

先说个题外话,推荐下载官方的 Kitematic 工具,这个工具提供了图形化操作界面,对新手来说非常友好: https://github.com/docker/kitematic/releases

如果对 Docker 基本操作、基本概念不太熟悉,推荐先花半小时看一下这本书的前6章节:http://udn.yyuap.com/doc/docker_practice/


如果你已经启动了容器,使用 docker ps -a 来查看所有 container 的情况,这时你能看到你想要进入的容器的 container ID, 比如是: 7ab34b8274.

如果要想进入容器的 bash shell,那么直接在命令行下输入下面这条命令:

$ docker exec -i -t 7ab3 /bin/bash

就可以打开容器的 bash shell 了。

打开后的 bash prompt 会变成下面这个样子:

root@7ab34b8274: 

希望对你有帮助 :)

@Medicean Medicean added the question label Jun 26, 2017

@pench3r

This comment has been minimized.

Copy link

pench3r commented Jul 10, 2017

推荐一个我经常使用的
docker attach containerid
退出的话使用
ctrl + p + q 先ctrl再p,然后再q

@ghost

This comment has been minimized.

Copy link

ghost commented Jan 27, 2018

博主,请问您那个个人漏洞站点是用什么模板搭建的呢?我感觉特别好,想下载下来玩玩

@Medicean

This comment has been minimized.

Copy link
Owner

Medicean commented Jan 28, 2018

@ghost

This comment has been minimized.

Copy link

ghost commented Jan 28, 2018

@Medicean Thank you very much!

@Medicean Medicean closed this May 13, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment