centos7 docker

First, install Docker
1, Docker system requirements CentOS kernel version higher than 3.10, see this page prerequisite to verify your CentOS version supports Docker.

View your current kernel version by uname -r command
$ uname -r

2, log on Centos with root privileges. Ensure that the yum package up to date.
$ Sudo yum update

3, uninstall the old version (if an old version is installed)
$ sudo yum the Remove-the Common Docker Docker Docker Docker-SELinux-Engine

4, required installation package, yum-util provide yum-config-manager function, the other two are driven devicemapper dependent
$ sudo yum install -y yum-utils devicemapper-persistent-data lvm2

5, the source provided yum
yum-config-manager --add-repo http://download.docker.com/linux/centos/docker-ce.repo

6, you can view all versions of all warehouse docker, and choose a specific version to install
$ yum list docker-ce --showduplicates | sort -r

7, the installation Docker
yum the install Docker-CE-18.03.1.ce

8, start and join startup
$ sudo systemctl Start Docker
$ sudo systemctl enable Docker

9, verify that the installation was successful (there are two parts, client service and installation start indicate docker are successful)
$ docker Version


Installation docker-compose

sudo curl -L “https://github.com/docker/compose/releases/download/1.23.2/docker-compose- ( in n a m e s ) (uname -s)- (uname -m)” -o /usr/local/bin/docker-compose

sudo chmod +x /usr/local/bin/docker-compose

docker-compose --version


Running the Project

git clone https://github.com/c0ny1/vulstudy.git

1. Run a single platform vulnerability

cd to the next platform vulnerability to run, run the following command

vulstudy cd / DVWA
Docker -d # start-up Compose container

Shut down the server port 80
service httpd stop

docker-compose stop # stop the container

service httpd start to open the server port 80

2. run all the loopholes platform

Under the project root directory run the following command

cd vulstudy

docker-compose up -d # to start container

Close 80-port
service httpd stop

docker-compose stop # stop the container

Published 17 original articles · won praise 2 · Views 3518

Guess you like

Origin blog.csdn.net/Aidang/article/details/102736776