What is a docker environment
A Docker environment is a runtime environment on a computer with the Docker engine installed and configured.Docker is a containerization platform that provides a lightweight virtualization technology capable of packaging an application and its dependencies into a single, independent container for rapid deployment, portability, and ease of management benefits. (Docker environments provide an easy, portable, and isolated way to manage applications and accelerate the development, deployment, and scaling process, much like a factory provides an efficient, standardized, and scalable approach to production.)
Docker Installation Steps
(Running environment: centos 7.9)
1. Uninstall the original Docker on the system before installation.
(We recommend deleting and reinstalling with or without installation)
y yum remove docker \
docker-client \
docker-client-latest \
docker-common \
docker-latest \
docker-latest-logrotate \
docker-logrotate \
docker-engine
** 2. Installation of dependency packages**yum install -y yum-utils
** 3. Set the image repository address (where docker is downloaded from)**
yum-config-manager \
--add-repo \
/linux/centos/ ##official address
Note: It is recommended to change to a domestic source address (Aliyun, etc.)Tsinghua University source: https:**///docker-ce/linux/centos/**
4. Install the docker enginesudo yum install docker-ce docker-ce-cli
Check the docker version after installation is complete
dockr -v
5. Start the Docker service and set it to boot: (very necessary)
sudo systemctl start docker
sudo systemctl enable docker
** 6. Verify that Docker was successfully installed:**sudo docker run hello-world
Normal output means successful installation.
** What is docker compose**
Docker Compose is a tool for defining and running multiple Docker containers. It allows you to use YAML files to describe your application's components, services, and network configurations so that you can easily start, stop, and manage multiple containers.
With Docker Compose, you can define a variety of dependencies for your application in a single configuration file, including container images, environment variables, mounted volumes, network settings, and more. By writing a simple YAML configuration file, you can easily create, configure and manage multiple related containers, which is useful for complex multi-container applications. (Personally, I understand it as a tool to better manipulate and run containers)
Installation steps
First, make sure that you have installed the Docker engine.Docker Compose is a tool that works with Docker, so you need to install the Docker engine first.
Open a terminal or command prompt and run the following command to download the latest version of the Docker Compose binary:
sudo curl -L "/docker/compose/releases/latest/download/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
(A recurring problem with this piece is that newbie-weenie me, who doesn't have a proxy turned on, has connection issues when trying to clone repositories from GitHub over the HTTPS protocol)
This is the time to check out the Mastermind videodocker compose installs.
3. Verify that the installation was successful. Run the following command to check the version of Docker Compose:
docker-compose --version
As a follow-up, you can check out docker commands to learn about docker containers.