1.安装python2

ubuntu1604默认已经安装python3.5
sudo apt install python2

2.安装pip3最新版

sudo wget https://bootstrap.pypa.io/pip/3.5/get-pip.py
python3 get-pip.py

3.安装docker社区版

sudo apt-get install -y apt-transport-https ca-certificates curl software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
sudo apt-get update
sudo apt-get install -y docker-ce
sudo systemctl enable docker
sudo systemctl start docker
给普通用户user添加到docker组,使得该用户可以直接使用docker:
sudo usermod -aG docker dgq

4.安装docker-compose最新版

sudo curl -L "https://github.com/docker/compose/releases/download/1.29.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose

5.安装ctfd-whale动态靶机

sudo docker swarm init
docker node update --label-add='name=linux-1' $(docker node ls -q)
git clone https://github.com/VaalaCat/CTFd.git --depth=1
cd CTFd
git submodule update --init
docker-compose up -d

检查docker日志,看看ctfd是否 正常启动
docker logs ctfd_ctfd_1

标签: none

评论已关闭