在这里,探讨最新的 Web3 技术和人工智能领域的前沿发展。

Install Docker and Docker Compose quickly and easily on Debian 11 server.

1. Update Software Packages#

Run the command sudo apt update to update the apt software package index, and then run sudo apt upgrade to update the installed software packages.

2. Install Docker#

Copy and paste the following commands directly into the terminal console and press Enter to submit:

sudo apt-get install apt-transport-https ca-certificates curl gnupg lsb-release
curl -fsSL | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg
echo \
  "deb [arch=amd64 signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] \
  $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
sudo apt-get update
sudo apt-get install docker-ce docker-ce-cli

After installation, the Docker daemon will start and automatically start on system reboot.

3. Install Docker Compose#

Run the following command to install Docker Compose:

sudo curl -L "$(curl --silent | grep '"tag_name":' | sed -E 's/.*"([^"]+)".*/\1/')/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose

4. Installation Complete#

Now your Debian 11 server has Docker and Docker Compose installed.
You can verify the installation by running the commands docker -v and docker-compose --version.

Ownership of this post data is guaranteed by blockchain and smart contracts to the creator alone.