From 7c820ffcf1a7ace63bce611a1bdbf25010663ad2 Mon Sep 17 00:00:00 2001 From: firmianay Date: Wed, 7 Nov 2018 16:47:38 +0800 Subject: [PATCH] update --- doc/2.1.3_docker.md | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/doc/2.1.3_docker.md b/doc/2.1.3_docker.md index eb3de74..793afe4 100644 --- a/doc/2.1.3_docker.md +++ b/doc/2.1.3_docker.md @@ -1 +1,35 @@ # 2.1.3 Docker + +在配置 pwn 环境时,如果不想每次都用 socat,那么 [ctf_xinetd](https://github.com/Eadom/ctf_xinetd) 是个不错的选择。 + +安装 docker: + +```shell +$ sudo apt install docker.io +``` + +ctf_xinetd 用法示例: + +```shell +$ git clone https://github.com/Eadom/ctf_xinetd.git +$ sudo docker build -t "helloworld" ./ctf_xinetd/ +$ sudo docker run -d -p "0.0.0.0:10001:9999" -h "helloworld" --name="helloworld" helloworld +``` + +docker 的一些基本操作: + +```shell +$ sudo docker images +REPOSITORY TAG IMAGE ID CREATED SIZE +helloworld latest 80b466e06d24 2 hours ago 372 MB +ubuntu 16.04 4a689991aa24 2 weeks ago 116 MB +$ sudo docker ps -a +CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES +8f8a5d22f68e helloworld "/start.sh" About a minute ago Up About a minute 0.0.0.0:10001->9999/tcp helloworld +$ sudo docker stop 8f8a5d22f68e +8f8a5d22f68e +$ sudo docker rm 8f8a5d22f68e +8f8a5d22f68e +$ sudo docker rmi 80b466e06d24 +Untagged: helloworld:latest +```