Skip to content
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

Docker #17

Open
AI0TSec opened this issue Jul 1, 2019 · 0 comments
Open

Docker #17

AI0TSec opened this issue Jul 1, 2019 · 0 comments

Comments

@AI0TSec
Copy link
Owner

AI0TSec commented Jul 1, 2019

查看所有镜像
$ docker images
查看所有创建的容器
$ docker ps -a
查看正在运行的容器
$ docker ps
进入正在运行的容器
$ docker exec -it <容器的 CONTAINER ID 或者 容器 NAMES > /bin/bash
开始 停止 重启 容器

$ docker start <容器的 CONTAINER ID 或者 容器 NAMES >
$ docker stop <容器的 CONTAINER ID 或者 容器 NAMES >
$ docker restart <容器的 CONTAINER ID 或者 容器 NAMES >

查看容器 log
$ docker logs -f <容器的 CONTAINER ID 或者 容器 NAMES >
删除容器
$ docker rm <容器的 CONTAINER ID 或者 容器 NAMES >
删除镜像
$ docker rmi <镜像的 CONTAINER ID>
更新镜像
$ docker pull <镜像地址:版本>
建立镜像
docker build -t="name/tag" /file/path

-t 标记来添加 tag,指定新的镜像的用户信息,/file/path是Dockerfile所在的路径

@AI0TSec AI0TSec added the Docker label Jul 1, 2019
@AI0TSec AI0TSec added this to 容器安全 in 前沿安全技术 Jul 26, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Development

No branches or pull requests

1 participant