Tutorial on compiling and installing Docker on Ubuntu 18.04 system.

WBOY
Release: 2024-02-19 14:03:02
forward
1098 people have browsed it

Ubuntu 18.04系统编译安装Docker教程。

The following is a tutorial for compiling and installing Docker on Ubuntu 18.04 system:

  1. Uninstall the old version of Docker (if installed):

    sudo apt remove docker docker-engine docker.io containerd runc
    Copy after login
  2. Update system packages:

    sudo apt update
    sudo apt upgrade
    Copy after login
  3. Install Docker dependencies:

    sudo apt install apt-transport-https ca-certificates curl software-properties-common
    Copy after login
  4. Add Docker’s official GPG key:

    curl -fsSL | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg
    Copy after login
  5. Add Docker official software source:

    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
    Copy after login
  6. Update package index:

    sudo apt update
    Copy after login
  7. Install Docker:

    sudo apt install docker-ce docker-ce-cli containerd.io
    Copy after login
  8. Add the current user to the docker user group (optional, allow non-admin users to run Docker commands):

    sudo usermod -aG docker $USER
    Copy after login
  9. Log in again or restart the system to make the user group changes take effect.
  10. Verify whether the Docker installation is successful:

    docker --version
    Copy after login

    If the installation is successful, Docker version information will be displayed.

Now, you have successfully compiled and installed Docker on Ubuntu 18.04. Please make sure you have the necessary permissions when running Docker commands as a normal user. Please note that installation and use of Docker may require specific network configuration and other settings depending on your application needs.

Please note that Docker installed through compilation and installation will not be updated automatically. You need to manually update the version or perform maintenance. In addition, you can consider using the Docker version provided by the system package manager for more convenient updates and management.

The above is the detailed content of Tutorial on compiling and installing Docker on Ubuntu 18.04 system.. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:mryunwei.com
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template