美文网首页
docker初次使用札记(安装篇)

docker初次使用札记(安装篇)

作者: rootsecurity | 来源:发表于2017-07-18 17:31 被阅读0次

    1.安装

    1.1. 安装脚本,因为GFW的原因,官方的脚本总会各种失败,这里还是推荐使用国内镜像的脚本

    阿里云:

    [root@localhost ~]# curl -sSL http://acs-public-mirror.oss-cn-hangzhou.aliyuncs.com/docker-engine/internet | sh -

    DaoCloud:

    [root@localhost ~]# curl -sSL https://get.daocloud.io/docker | sh

    2.镜像

    2.1. 安装完毕后,执行docker --version确认是否安装成功

    [root@localhost ~]# docker --version

    Docker version 17.05.0-ce, build 89658be

    2.2. 下载相关镜像,这里以Apache Struts2官方S2-048漏洞为例

    [root@localhost ~]# docker pull medicean/vulapps:s_struts2_s2-048

    2.3. 启动镜像

    [root@localhost ~]# docker run -d -p 80:8080 medicean/vulapps:s_struts2_s2-048 

    -p 80:8080前面的 80 代表物理机的端口,可随意指定。

    2.4. 访问

    访问http://你的 IP 地址:端口号/

    相关文章

      网友评论

          本文标题:docker初次使用札记(安装篇)

          本文链接:https://www.haomeiwen.com/subject/ljphkxtx.html