In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)05/31 Report--
In this issue, the editor will bring you about how to get started with Docker and build a vulnerability testing environment. The article is rich in content and analyzes and describes for you from a professional point of view. I hope you can get something after reading this article.
01 introduction to Docker
Docker is an open source application container engine based on the Go language and open source according to the Apache2.0 protocol.
Docker allows developers to package their applications and dependencies into a lightweight, portable container and publish them to any popular Linux machine.
Containers completely use sandboxing mechanism, there will not be any interface with each other, more importantly, the container performance overhead is extremely low.
Advantages
Docker:
OpenStack:
Three major concepts
Mirror (image)
A Docker image is a read-only template. For example, an image can contain a complete operating system environment with only Apache or other applications required by the user installed.
Images can be used to create containers
Container (container)
Docker uses containers to run applications. A container is a running instance created from an image. It can start, stop, start and delete. Each container is isolated from each other to ensure the security of the platform.
Think of the container as a simple version of the linux system and the applications running in it
Warehouse (repository)
A warehouse is a place where images are stored centrally. Sometimes repositories and warehouse registrars are mixed together without strict distinction. Warehouse registers often store multiple warehouses, each warehouse contains multiple images, and each image has a different tag. Warehouses are divided into public warehouses and private warehouses, and the largest public warehouse is DockerHub.
02 basic use of Docker
Start
Centos:sudo systemctl start docker
Ubuntu:sudo service start docker
MacOS: click run
Basic information
Docker info
Docker stats
Docker version
Add a domestic image repository:
Https://docker.mirrors.ustc.edu.cn
Mirror image
Docker search search
Docker pull download
Docker images views the list of images
Container
Docker run-d-P-name container name mirror address
(- d background operation-P randomly assigned port-ppoartA:portB host port-docker port)
Docker ps View Container status
Docker exec docker exec-iMurt xxx/bin/bash interacts with the container
Docker stop container name stop a container
Docker stop $(docker ps-Q)
Yum install net-tools-y installs the commonly used network management command library 03 Docker to build a vulnerability test environment
Metasploit
Docker run-- rm-it-v'/ usr/bin/docker:/docker:ro' strm/metasploit
(there are various versions of metasploit and Kali in the mirror library. Choose.)
Image of existing vulnerabilities
Https://github.com/Medicean/VulApps/
Contains part of the vulnerability environment for learning.
Docker run-d-p 8015 medicean/vulapps:s_struts2_s2-037
This machine can access port 80.
Set up CMS
Database:
Docker run-- name mariadb_discuz-eMYSQL_ROOT_PASSWORD=password-d mariadb
Web:
Docker run-d-P-v/Users/Rachel/Desktop/CMS/discuz/Discuz_7.2_SC_UTF8:/var/www/html/--link=mariadb_discuz:mysql--name=discuz_7.2 b1nswim/apache_php7_base
Parameter description:
Folder mount:-v Local folder address: docker folder address.
Link between containers-link= (database) container name: alias when referenced (database).
Amway time: welcome to b1nswim Mirror Library, we upload all kinds of CMS images.
04 Docker Advanced
Create an image and upload it to the image library
Docker Security:
Docker Image attack and Image Security scanning
Docker architecture flaw: impact by launching attacks on hosts or other containers
Docker security baseline standard
The above is the introduction to Docker and vulnerability testing environment that Xiaobian shared for you. If you happen to have similar doubts, please refer to the above analysis to understand. If you want to know more about it, you are welcome to follow the industry information channel.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.