基于Docker的网络安全靶场搭建
马哥Linux运维
共 3218字,需浏览 7分钟
·
2021-09-26 14:25
查询可安装版本:
yum list docker-ce --showduplicates | sort -r
安装docker-ce:
yum install docker-ce-20.10.6 docker-ce-cli-20.10.6 containerd.io
查看是否安装成功:
docker version或者docker info
:
systemctl start docker
开机自启:
systemctl enable docker
一、操作机基础工具安装
docker search kali
docker pull kalilinux/kali-rolling
docker images
docker run -itd -p 3399:3389 kalilinux/kali-rolling /bin/bash
docker ps
docker attach ID
-y update && apt-get -y upgrade && \
DEBIAN_FRONTEND=noninteractive apt-get install -y \
kali-tools-top10 \
pciutils \
vim \
iputils-ping \
bash-completion && \
apt-get autoremove -y && \
apt-get clean
docker commit ID kali-2021
二、远程桌面环境安装
docker run -itd -p 3399:3389 kali-2021
docker exec -it ID /bin/bash
vi /etc/apt/source.list
deb http://mirrors.ustc.edu.cn/kali kali-rolling main non-free contrib
deb-src http://mirrors.ustc.edu.cn/kali kali-rolling main non-free contrib
apt-get update
apt-get -y install kali-desktop-xfce xorg xrdp
sed -i 's/port=3399/port=3389/g' /etc/xrdp/xrdp.ini
service xrdp restart
passwd root
docker run -d --name="tomcat-mysql-run" -e MYSQL_PASSWORD=root -p 1306:3306 -p 1080:8080 aallam/tomcat-mysql
docker exec –it ID /bin/bash
(版权归原作者所有,侵删)
点击下方“阅读原文”查看更多
评论