Docker使用总结

Docker

Docker是基于Go语言实现的云开源项目,基于Linux的多项开源技术提供高效、敏捷和轻量级的容器方案。

Docker的基本概念

Docker 容器是资源分割和调度的基本单位,封装整个服务的运行时环境,用于构建、发布和运行分布式应用的一个框架。它是一个跨平台、可移植并且简单易用的容器解决方案。Docker 的源代码托管在 GitHub 上,基于 Go 语言开发并遵从 Apache 2.0 协议。

Docker 容器可以快速自动化地部署应用,并通过操作系统内核技术(namespaces、 cgroups等)为容器提供资源隔离与安全保障。Docker 作为轻量级的虚拟化方式,实现了 PaaS 平台的高效部署、运行和维护。

Docker的优势

解决了运行环境和配置问题软件容器,方便做持续集成并有助于整体发布的容器虚拟化技术。

  • 更快速的应用支付和部署
  • 更便捷的升级和扩缩容
  • 更简单的系统运维
  • 优异的跨平台性
  • 高资源利用率与隔离
  • 丰富的应用镜像仓库

docker的组成

  • 镜像(image)

    • docker镜像类似于虚拟机镜像,可以将它理解为一个只读的模板。镜像可以用来创建docker容器,一个镜像可以创建很多容器。
  • 容器(container)

    • docker容器类似于一个轻量级的沙箱,Docker 利用容器来运行和隔离应用。容器是从镜像创建的应用运行实例。可以将其启动、开始、停止、删除,而这些容器都是彼此相互隔离的、互不可见的。
    • 容器的定义和镜像几乎一模一样,也是一堆层的统一视角,唯一区别在于容器的最上面那一层是可读可写的。
  • 仓库(repository)

    • 仓库类似于代码仓库,它是 Docker 集中存放镜像文件的场所。
    • 仓库和仓库注册服务器是有区别的。
      • 仓库注册服务器上往往存放着多个仓库,每个仓库中又包含了多个镜像,每一个镜像有不同的标签
    • 仓库分为公开仓库和私有仓库两种形式
    • 最大的公开仓库是docker hub:https://hub.docker.com/
    • Docker利用仓库管理镜像的设计理念与 Git 非常相似,实际上在理念设计上借鉴了 Git 的很多优秀思想。

Docker安装

1、Linux内核版本查看
#安装docker要求内核版本kerner>=3.10
#为此,先检查当前Linux系统的内核版本
$uname -r
3.10.0-862.el7.x86_64
$cat /etc/system-release
CentOS Linux release 7.5.1804 (Core) 
2、准备工作
若有旧版本,先卸载
yum remove docker \
docker-client \
docker-client-latest \
docker-common \
docker-latest \
docker-latest-logrotate \
docker-logrotate \
docker-engine
安装关联组件

yum install -y yum-utils

3、设置镜像地址
官方地址
yum-config-manager \
--add-repo \
https://download.docker.com/linux/centos/docker-ce.repo
阿里云镜像地址(推荐)
yum-config-manager \
--add-repo \
http://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo
更新yum软件包索引

yum makecache fast

4、安装docker相关的

yum install docker-ce docker-ce-cli containerd.io

5、启动docker

systemctl start docker

6、判断Docker是否启动成功

docker version

7、测试DOcker

docker run hello-world

8、查看镜像

docker images

9、配置 阿里云docker 镜像加速(要配置你自己的)

mkdir -p /etc/docker

$tee /etc/docker/daemon.json <<-'EOF'
{
"registry-mirrors": ["https://XXXXXX.mirror.aliyuncs.com"]
}
EOF

systemctl daemon-reload

systemctl restart docker

常用命令

系统命令

systemctl start docker                	#启动docker
systemctl stop docker                	#停止docker
systemctl restart docker            	#重启docker
systemctl enable docker                	#设置docker开机自启

基本命令

docker version                        #查看docker版本
docker info                           #查看docker详细信息
docker --help                         #查看docker命令

镜像命令

#镜像命令
docker images                        	#查看docker镜像列表
docker images -a                    	#列出本地所有镜像
docker images --digests                	#显示镜像的摘要信息
docker search redis                    	#从Docker Hub上查找redis镜像
docker pull redis                    	#从Docker Hub上下载redis镜像
docker rmi 373f0984b070                	#删除IMAGE ID 为373f0984b070的镜像

运行命令

#运行命令
#-p 6379:6379    端口映射:前表示主机部分,后表示容器部分
#-d    在后台运行容器(不进入终端)并打印容器ID/容器名
#--name myredis表示自定义容器名为myredis
docker run -d -p 6379:6379 --name myredis redis:latest        #根据镜像创建并运行容器

容器命令

docker container lsdocker ps                	#查看正在运行的容器
docker container ls -a 或 docker ps -a            	#列出所有容器
docker container start 容器ID 或 容器名称 			#启动容器
docker start 容器ID 或 容器名称                    	#启动容器
docker container stop 容器ID 或 容器名称            	#停止容器
docker stop 容器ID 或 容器名称                    		#停止容器
docker container rm 容器ID 或 容器名称           	 	#删除容器
docker rm 容器ID 或 容器名称                        	#删除容器
docker container logs -f 容器ID 或 容器名称        	#查看容器日志
docker exec -it name /bin/bash                     	#进入name(容器名/id)中开启交互式的终端,exit退出

实战记录

# 查看所有正在运行容器
docker ps

# containerId 是容器的ID
docker stop containerId 

# 查看所有容器
docker ps -a 

# 查看所有容器ID
docker ps -a -q 

# stop停止所有容器
docker stop $(docker ps -a -q) 

# remove删除所有容器
docker rm $(docker ps -a -q) 

中文帮助

Usage:
docker [OPTIONS] COMMAND [arg...]
       docker daemon [ --help | ... ]
       docker [ --help | -v | --version ]
A
self-sufficient runtime for containers.


Options:
  --config=~/.docker              Location of client config files  #客户端配置文件的位置
  -D, --debug=false               Enable debug mode  #启用Debug调试模式
  -H, --host=[]                   Daemon socket(s) to connect to  #守护进程的套接字(Socket)连接
  -h, --help=false                Print usage  #打印使用
  -l, --log-level=info            Set the logging level  #设置日志级别
  --tls=false                     Use TLS; implied by--tlsverify  #
  --tlscacert=~/.docker/ca.pem    Trust certs signed only by this CA  #信任证书签名CA
  --tlscert=~/.docker/cert.pem    Path to TLS certificate file  #TLS证书文件路径
  --tlskey=~/.docker/key.pem      Path to TLS key file  #TLS密钥文件路径
  --tlsverify=false               Use TLS and verify the remote  #使用TLS验证远程
  -v, --version=false             Print version information and quit  #打印版本信息并退出


Commands:
    attach    Attach to a running container  					#当前shell下attach连接指定运行镜像
    build     Build an image from a Dockerfile  				#通过Dockerfile定制镜像
    commit    Create a new image from a container\'s changes  	 #提交当前容器为新的镜像
    cp          Copy files/folders from a container to a HOSTDIR or to STDOUT  #从容器中拷贝指定文件或者目录到宿主机中
    create    Create a new container  						   #创建一个新的容器,同run 但不启动容器
    diff      Inspect changes on a container's filesystem  		#查看docker容器变化
    events    Get real time events from the server#从docker服务获取容器实时事件
    exec      Run a command in a running container#在已存在的容器上运行命令
    export    Export a container's filesystem as a tar archive  #导出容器的内容流作为一个tar归档文件(对应import)
    history   Show the history of an image  #展示一个镜像形成历史
    images    List images  #列出系统当前镜像
    import    Import the contents from a tarball to create a filesystem image  #从tar包中的内容创建一个新的文件系统映像(对应export)
    info      Display system-wide information  #显示系统相关信息
    inspect   Return low-level information on a container or image  #查看容器详细信息
    kill      Kill a running container  #kill指定docker容器
    load      Load an image from a tar archive or STDIN  #从一个tar包中加载一个镜像(对应save)
    login     Register or log in to a Docker registry#注册或者登陆一个docker源服务器
    logout    Log out from a Docker registry  #从当前Docker registry退出
    logs         Fetch the logs of a container  #输出当前容器日志信息
    pause     Pause all processes within a container#暂停容器
    port      List port mappings or a specific mapping for the CONTAINER  #查看映射端口对应的容器内部源端口
    ps          List containers  #列出容器列表
    pull      Pull an image or a repository from a registry  #从docker镜像源服务器拉取指定镜像或者库镜像
    push      Push an image or a repository to a registry  #推送指定镜像或者库镜像至docker源服务器
    rename    Rename a container  #重命名容器
    restart   Restart a running container  #重启运行的容器
    rm          Remove one or more containers  #移除一个或者多个容器
    rmi          Remove one or more images  #移除一个或多个镜像(无容器使用该镜像才可以删除,否则需要删除相关容器才可以继续或者-f强制删除)
    run         Run a command in a new container  #创建一个新的容器并运行一个命令
    save      Save an image(s) to a tar archive#保存一个镜像为一个tar包(对应load)
    search    Search the Docker Hub for images  #在docker
hub中搜索镜像
    start     Start one or more stopped containers#启动容器
    stats     Display a live stream of container(s) resource usage statistics  #统计容器使用资源
    stop      Stop a running container  #停止容器
    tag       Tag an image into a repository  #给源中镜像打标签
    top       Display the running processes of a container #查看容器中运行的进程信息
    unpause   Unpause all processes within a container  #取消暂停容器
    version   Show the Docker version information#查看容器版本号
    wait      Block until a container stops, then print its exit code  #截取容器停止时的退出状态值

docker的应用部署

1、部署DockerUI

搜索DockerUI镜像
docker search ui-for-docker
拉取DockerUI镜像
docker pull uifd/ui-for-docker
创建容器,设置端口映射、目录映射
docker run -it -d \
--name docker-web \
-p 1000:9000 \
-v /var/run/docker.sock:/var/run/docker.sock uifd/ui-for-docker
  • 参数说明:
    • -p 1000:9000:将容器的 9000 端口映射到宿主机的 1000 端口。

    • -v : 挂载宿主机目录和 docker容器中的目录,前面是宿主机目录,后面是容器内部目录

      -d : 后台运行容器

      -p 映射容器端口号和宿主机端口号

访问DockerUI

打开web浏览器进行访问:宿主机IP:1000

2、部署容器管理系统portainer

安装
docker pull portainer/portainer
Using default tag: latest
latest: Pulling from portainer/portainer
94cfa856b2b1: Pull complete 
49d59ee0881a: Pull complete 
a2300fd28637: Pull complete 
Digest: sha256:fb45b43738646048a0a0cc74fcee2865b69efde857e710126084ee5de9be0f3f
Status: Downloaded newer image for portainer/portainer:latest
docker.io/portainer/portainer:latest

docker run -d -p 9000:9000 \
>     --restart=always \
>     -v /var/run/docker.sock:/var/run/docker.sock \
>     --name prtainer-test \
>     portainer/portainer
6d4f9a5a5efd2ae40a96e112252c7f86768eb0efe3232c282baafd2fb1b2aadf
启动
docker start  6d4f9a5a5efd2ae40a96e112252c7f86768eb0efe3232c282baafd2fb1b2aadf
访问

http://宿主机IP:9000/

3、部署MySQL

搜索mysql镜像
docker search mysql
拉取mysql镜像
docker pull mysql:5.6
创建容器,设置端口映射、目录映射
# 在/root目录下创建mysql目录用于存储mysql数据信息
mkdir ~/mysql
cd ~/mysql
docker run -id \
-p 3306:3306 \
--name=mysql \
-v $PWD/conf:/etc/mysql/conf.d \
-v $PWD/logs:/logs \
-v $PWD/data:/var/lib/mysql \
-e MYSQL_ROOT_PASSWORD=123456 \
mysql:5.6
  • 参数说明:
    • -p 3306:3306:将容器的 3306 端口映射到宿主机的 3306 端口。

    • -v $PWD/conf:/etc/mysql/conf.d:将主机当前目录下的 conf/my.cnf 挂载到容器的 /etc/mysql/my.cnf。配置目录

    • -v $PWD/logs:/logs:将主机当前目录下的 logs 目录挂载到容器的 /logs。日志目录

    • -v $PWD/data:/var/lib/mysql :将主机当前目录下的data目录挂载到容器的 /var/lib/mysql 。数据目录

    • **-e MYSQL_ROOT_PASSWORD=123456:**初始化 root 用户的密码。

    • -v : 挂载宿主机目录和 docker容器中的目录,前面是宿主机目录,后面是容器内部目录

      -d : 后台运行容器

      -p 映射容器端口号和宿主机端口号

      -e 环境参数,MYSQL_ROOT_PASSWORD设置root用户的密码

进入容器,操作mysql
docker exec -it mysql /bin/bash

ALTER USER 'root'@'%' IDENTIFIED WITH mysql_native_password BY '123456';

使用外部机器连接容器中的mysql

4、安装 kali linux

docker search kalilinux

docker run -itd --net=none --name=k6 kalilinux/kali-linux-docker /bin/bash

cd /usr/local/data/pipework/

./pipework em1 k6 10.5.20.6/24@10.5.20.254

docker exec -it 471f6e6b7c65525af864d4ce1f9f2e5bd83d8a54c4c01d35b27d99e3139b22ae /bin/bash

$docker run --name kali -it -p 100:22 kalilinux/kali-linux-docker /bin/bash exit

//查看所有容器 docker ps -a 
//启动容器 docker start 容器id 
//进入容器 docker attach

$docker stop $(docker ps -a -q|grep kali)

5、TWAPT搭建靶场环境

Webs
  • Webgoat : localhost:8080/WebGoat
  • Mutillidae : localhost:8088/mutillidae
  • DVWAP : localhost:8081
  • bwapp : localhost:8082/install.php
  • Juice-Shop : localhost:8083
  • NinjaWeb : localhost:8899
  • VulnWordpress : localhost:8086
Usage mode.
git clone https://github.com/MoisesTapia/TWAPT
cd TWAPT
docker-compose up -d

output

➜  TWAPT git:(deploy)docker-compose up -d      
Creating network "twapt_pentesting" with driver "bridge"
Creating juiceshop ... done
Creating webgoat   ... done
Creating dvwap     ... done
Creating bwapp     ... done
Creating bricks    ... done
Creating owasp17   ... done
Creating ninjaweb  ... done
➜  TWAPT git:(deploy)

‘docker-compose ps’

➜  TWAPT git:(deploy)docker-compose ps
  Name                 Command               State                          Ports                        
---------------------------------------------------------------------------------------------------------
bricks      /run.sh                          Up      3306/tcp, 0.0.0.0:8084->80/tcp                      
bwapp       /run.sh                          Up      3306/tcp, 0.0.0.0:8082->80/tcp                      
dvwap       /main.sh                         Up      0.0.0.0:8081->80/tcp                                
juiceshop   docker-entrypoint.sh npm start   Up      0.0.0.0:8083->3000/tcp                              
ninjaweb    /bin/sh -c /usr/sbin/apach ...   Up      0.0.0.0:8899->80/tcp                                
owasp17     /usr/bin/supervisord             Up      3306/tcp, 0.0.0.0:443->443/tcp, 0.0.0.0:8088->80/tcp
webgoat     java -Djava.security.egd=f ...   Up      0.0.0.0:8080->8080/tcp                              
➜  TWAPT git:(deploy)
Stoping the services

docker-compose stop or docker-compose down

操作记录
[root@master-node(➜  ) TWAPT]$docker-compose up -d
Creating network "twapt_pentesting" with driver "bridge"
Creating volume "twapt_webgoat" with default driver
Creating volume "twapt_dbwap" with default driver
Creating volume "twapt_bwapp" with default driver
Creating volume "twapt_wpress" with default driver
Pulling webgoat (webgoat/webgoat-8.0:)...
latest: Pulling from webgoat/webgoat-8.0
5e6ec7f28fb7: Pull complete
1cf4e4a3f534: Pull complete
5d9d21aca480: Pull complete
0a126fb8ec28: Pull complete
1904df324545: Pull complete
e6d9d96381c8: Pull complete
885c4a759329: Pull complete
970a9918b240: Pull complete
0320947fb529: Pull complete
Digest: sha256:e24bcaf41034c28b6a08aba94507a169ae23f2b87899e225a3d18fe8c36d26f5
Status: Downloaded newer image for webgoat/webgoat-8.0:latest
Pulling wodpress (l505/vulnerablewordpress:)...
latest: Pulling from l505/vulnerablewordpress
d6fdcbe24ed5: Pull complete
1115217119d4: Pull complete
8180a23d2c44: Pull complete
ceab6b3c2a5e: Pull complete
1dd5986ab682: Pull complete
788d6b00f3de: Pull complete
b8635441a6d9: Pull complete
2ded5af71aae: Pull complete
c03a1393ab76: Pull complete
348958e9c5d7: Pull complete
95484040b6cc: Pull complete
f28015c52b07: Pull complete
d0f847029c31: Pull complete
0f14d0ad6555: Pull complete
e1791eff769f: Pull complete
8bd4fb4ae7b6: Pull complete
0b6e64b115c1: Pull complete
f740cef66b8f: Pull complete
f3a77a997882: Pull complete
8828d16f2e21: Pull complete
9099f5794da7: Pull complete
36dfd8c566e2: Pull complete
d4a21ed7956b: Pull complete
d51c32f2ac66: Pull complete
792c6d830ae3: Pull complete
5efffbaab435: Pull complete
4d338f1a9cda: Pull complete
51e62a1f34d2: Pull complete
1b46154e5bc5: Pull complete
Digest: sha256:1750221f1d587a0a5d6db73f19369a713b0961a934e4558f9023dedbe90603e3
Status: Downloaded newer image for l505/vulnerablewordpress:latest
Pulling dvwap (vulnerables/web-dvwa:)...
latest: Pulling from vulnerables/web-dvwa
3e17c6eae66c: Pull complete
0c57df616dbf: Pull complete
eb05d18be401: Pull complete
e9968e5981d2: Pull complete
2cd72dba8257: Pull complete
6cff5f35147f: Pull complete
098cffd43466: Pull complete
b3d64a33242d: Pull complete
Digest: sha256:dae203fe11646a86937bf04db0079adef295f426da68a92b40e3b181f337daa7
Status: Downloaded newer image for vulnerables/web-dvwa:latest
Pulling shop (bkimminich/juice-shop:)...
latest: Pulling from bkimminich/juice-shop
97518928ae5f: Pull complete
23182d7a473a: Pull complete
c006eebfdd13: Pull complete
a3c2ac39ae5d: Pull complete
1a89d29dd2bd: Pull complete
9620b55a8577: Pull complete
33b1f4a4102f: Pull complete
7b5f4d91d1d1: Pull complete
Digest: sha256:ff47d50ecb812a6c1678954bbe9ac66a05b3292535eccf48607a25ffc3fcf503
Status: Downloaded newer image for bkimminich/juice-shop:latest
Pulling bricks (citizenstig/owaspbricks:)...
latest: Pulling from citizenstig/owaspbricks
Image docker.io/citizenstig/owaspbricks:latest uses outdated schema1 manifest format. Please upgrade to a schema2 image for better future compatibility. More information at https://docs.docker.com/registry/spec/deprecated-schema-v1/
a3ed95caeb02: Pull complete
831a6feb5ab2: Pull complete
b32559aac4de: Pull complete
5e99535a7b44: Pull complete
aa076096cff1: Pull complete
423664404a49: Pull complete
135868703588: Pull complete
7f543c8e669f: Pull complete
b3af5d17d690: Pull complete
82dc3a16c6b6: Pull complete
bce61c6891d4: Pull complete
b743306e71ce: Pull complete
6248b1d03b5e: Pull complete
813090dac205: Pull complete
5f9ee7d91862: Pull complete
fdf856fb4577: Pull complete
bd22983ac4d5: Pull complete
3522a58d2292: Pull complete
af0146629fdc: Pull complete
42ab6062ae13: Pull complete
8416f3701148: Pull complete
Digest: sha256:1a4b5d1cc4e37fa5522a7cdfdadfc3191dc7aa8abf962c035771eadae5378660
Status: Downloaded newer image for citizenstig/owaspbricks:latest
Pulling owasp (bltsec/mutillidae-docker:)...
latest: Pulling from bltsec/mutillidae-docker
c62795f78da9: Pull complete
d4fceeeb758e: Pull complete
5c9125a401ae: Pull complete
0062f774e994: Pull complete
6b33fd031fac: Pull complete
ba70ba96df56: Pull complete
Digest: sha256:f796fb5048795acd4662d46d2555d4df1649a9b4da20db96e060d7a2518d324d
Status: Downloaded newer image for bltsec/mutillidae-docker:latest
Pulling ninjaweb (opendns/security-ninjas:)...
latest: Pulling from opendns/security-ninjas
Image docker.io/opendns/security-ninjas:latest uses outdated schema1 manifest format. Please upgrade to a schema2 image for better future compatibility. More information at https://docs.docker.com/registry/spec/deprecated-schema-v1/
e190868d63f8: Pull complete
909cd34c6fd7: Pull complete
0b9bfabab7c1: Pull complete
a3ed95caeb02: Pull complete
f0df993c3aef: Pull complete
09358b20e8bc: Pull complete
5b0e1b98c45e: Pull complete
9c00e77d73a9: Pull complete
fe8e16791cf6: Pull complete
ac8b0ffa2b98: Pull complete
94051df6e066: Pull complete
Digest: sha256:aae15b7ca2827f1d4fcc5b38a238e8a207f1ebc1bd5eef921cef97f5f6262994
Status: Downloaded newer image for opendns/security-ninjas:latest
Pulling bwapp (feltsecure/owasp-bwapp:)...
latest: Pulling from feltsecure/owasp-bwapp
8387d9ff0016: Already exists
3b52deaaf0ed: Already exists
4bd501fad6de: Already exists
a3ed95caeb02: Pull complete
790f0e8363b9: Pull complete
11f87572ad81: Pull complete
341e06373981: Pull complete
709079cecfb8: Pull complete
55bf9bbb788a: Pull complete
b41f3cfd3d47: Pull complete
70789ae370c5: Pull complete
43f2fd9a6779: Pull complete
6a0b3a1558bd: Pull complete
934438c9af31: Pull complete
1cfba20318ab: Pull complete
de7f3e54c21c: Pull complete
596da16c3b16: Pull complete
e94007c4319f: Pull complete
3c013e645156: Pull complete
3b7789179d30: Pull complete
327cd2f5e443: Pull complete
9433a0f3b48a: Pull complete
Digest: sha256:9982a31bf586c99b0d70876cbcca8c3d26424ae3cc2f5625e661ec48a72606ec
Status: Downloaded newer image for feltsecure/owasp-bwapp:latest
Pulling cadvisor (google/cadvisor:)...
latest: Pulling from google/cadvisor
ff3a5c916c92: Pull complete
44a45bb65cdf: Pull complete
0bbe1a2fe2a6: Pull complete
Digest: sha256:815386ebbe9a3490f38785ab11bda34ec8dacf4634af77b8912832d4f85dca04
Status: Downloaded newer image for google/cadvisor:latest
Creating bricks ... 
Creating juiceshop        ... done
Creating vulwps    ... 
Creating bwapp     ... 
Creating owasp17   ... 
Creating dvwap     ... 
Creating webgoat   ... 
Creating webgoat          ... error
Creating twapt_cadvisor_1 ... 
Creating owasp17          ... error

Creating vulwps           ... error
Creating bricks           ... done
Creating dvwap            ... done

Creating bwapp            ... done37b4a956cc5fd): Error starting userland proxy: listen tcp4 0.0.0.0:8088: bind: address already in use
WARNING: Host is already in use by another container

ERROR: for vulwps  Cannot start service wodpress: driver failed programming external connectivity on endpoint vulwps (7ba90afbd251a122e028ba5ce3999d5bab34a1f0b535fe05a70a2c19f6e6ccf1): Bind for 0.0.0.0:3306 failed: port is already allocated

ERROR: for webgoat  Cannot start service webgoat: driver failed programming external connectivity on endpoint webgoat (14464e72b0fc07e4ae708c7c6fb26223a7f84151729dd53721d098bb143a8188): Bind for 0.0.0.0:8080 failed: port is already allocated

ERROR: for owasp  Cannot start service owasp: driver failed programming external connectivity on endpoint owasp17 (0a0b48ad66ed9fa7b574876ba84b3fe6cf11053e00f19ae9d4f37b4a956cc5fd): Error starting userland proxy: listen tcp4 0.0.0.0:8088: bind: address already in use

ERROR: for wodpress  Cannot start service wodpress: driver failed programming external connectivity on endpoint vulwps (7ba90afbd251a122e028ba5ce3999d5bab34a1f0b535fe05a70a2c19f6e6ccf1): Bind for 0.0.0.0:3306 failed: port is already allocated
ERROR: Encountered errors while bringing up the project.

由于端口被占用,启动失败,所有端口前加1,重新启动

[root@master-node(➜  ) TWAPT]$vim docker-compose.yml
[root@master-node(➜  ) TWAPT]$docker-compose up -d
Recreating bricks ... 
Recreating bricks    ... done
Recreating bwapp     ... done
Recreating vulwps    ... done
Recreating webgoat   ... done
Recreating juiceshop ... done
Recreating dvwap     ... done
Recreating ninjaweb  ... done
Recreating owasp17   ... done
TWAPT登录地址
WordPress

http://IP:18086/wp-admin/install.php

username、password 自行设置

ninjaweb

http://IP:18899/

dvwa

http://IP:18081/login.php

bwapp

http://IP:18082/login.php

juice-shop

http://IP:18083/

bricks

http://IP:18084/bricks.html

dashboard

http://IP:18088/dashboard/

知识链接

docker官网:http://www.docker.com

帮助文档:https://docs.docker.com/

中文网站:http://www.docker.org.cn/

Docker商店:https://hub.docker.com/

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值