Установка докер линукс минт

cstroe / linux-mint-mate-20.2-install-docker.md

Docker is available in the default repositories. You can install via apt :

sudo apt install docker.io 

Then add yourself to the docker group:

sudo usermod -a -G docker $(whoami) 

Restart the docker service and relogin, reboot, or start a new login shell (see «Troubleshooting» below).

You can check that everything is operational with Docker by running docker ps or docker version from the terminal:

$ docker ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES $ docker version Client: Version: 20.10.7 API version: 1.41 Go version: go1.13.8 Git commit: 20.10.7-0ubuntu1~20.04.1 Built: Wed Aug 4 22:52:25 2021 OS/Arch: linux/amd64 Context: default Experimental: true Server: Engine: Version: 20.10.7 API version: 1.41 (minimum version 1.12) Go version: go1.13.8 Git commit: 20.10.7-0ubuntu1~20.04.1 Built: Wed Aug 4 19:07:47 2021 OS/Arch: linux/amd64 Experimental: false containerd: Version: 1.5.2-0ubuntu1~20.04.2 GitCommit: runc: Version: 1.0.0~rc95-0ubuntu1~20.04.2 GitCommit: docker-init: Version: 0.19.0 GitCommit: 
Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Get http://%2Fvar%2Frun%2Fdocker.sock/v1.24/containers/json: dial unix /var/run/docker.sock: connect: permission denied 

Ensure the docker service is running:

sudo systemctl status docker 

should show it in the active (running) status.

If not, restart it with sudo systemctl restart docker .

Ensure you’re a member of the docker group:

grep -E "^docker:" /etc/group | cut -d: -f4 

Should show your user in the comma separated list. If it doesn’t, add yourself to the docker group (see instructions above).

Should show docker in the group list. If not, relogin to your system or restart the system, or use su $(whoami) to start a new login shell (see this StackExchange answer).

Источник

Install Docker Desktop on Linux

This page contains information about general system requirements, supported platforms, and instructions on how to install Docker Desktop for Linux.

Important

Docker Desktop on Linux runs a Virtual Machine (VM) so creates and uses a custom docker context desktop-linux on startup.

This means images and containers deployed on the Linux Docker Engine (before installation) are not available in Docker Desktop for Linux.

For more information see What is the difference between Docker Desktop for Linux and Docker Engine.

Supported platforms

Docker provides .deb and .rpm packages from the following Linux distributions and architectures:

An experimental package is available for Arch-based distributions. Docker has not tested or verified the installation.

Читайте также:  Linux add user permissions to folder

Docker supports Docker Desktop on the current LTS release of the aforementioned distributions and the most recent version. As new versions are made available, Docker stops supporting the oldest version and supports the newest version.

System requirements

To install Docker Desktop successfully, your Linux host must meet the following general requirements:

  • 64-bit kernel and CPU support for virtualization.
  • KVM virtualization support. Follow the KVM virtualization support instructions to check if the KVM kernel modules are enabled and how to provide access to the kvm device.
  • QEMU must be version 5.2 or newer. We recommend upgrading to the latest version.
  • systemd init system.
  • Gnome, KDE, or MATE Desktop environment.
    • For many Linux distros, the Gnome environment does not support tray icons. To add support for tray icons, you need to install a Gnome extension. For example, AppIndicator.

    Docker Desktop for Linux runs a Virtual Machine (VM). For more information on why, see Why Docker Desktop for Linux runs a VM.

    Note:

    Docker does not provide support for running Docker Desktop in nested virtualization scenarios. We recommend that you run Docker Desktop for Linux natively on supported distributions.

    KVM virtualization support

    Docker Desktop runs a VM that requires KVM support.

    The kvm module should load automatically if the host has virtualization support. To load the module manually, run:

    Depending on the processor of the host machine, the corresponding module must be loaded:

    $ modprobe kvm_intel # Intel processors $ modprobe kvm_amd # AMD processors 

    If the above commands fail, you can view the diagnostics by running:

    To check if the KVM modules are enabled, run:

    $ lsmod | grep kvm kvm_amd 167936 0 ccp 126976 1 kvm_amd kvm 1089536 1 kvm_amd irqbypass 16384 1 kvm 

    Set up KVM device user permissions

    To check ownership of /dev/kvm , run :

    Add your user to the kvm group in order to access the kvm device:

    Log out and log back in so that your group membership is re-evaluated.

    Generic installation steps

    Docker Desktop terms

    Commercial use of Docker Desktop in larger enterprises (more than 250 employees OR more than $10 million USD in annual revenue) requires a paid subscription.

    Make sure you meet the system requirements outlined earlier and follow the distro-specific prerequisites.

    Docker app in Applications

    1. Download the correct package for your Linux distribution and install it with the corresponding package manager.
      • Install on Debian
      • Install on Fedora
      • Install on Ubuntu
      • Install on Arch
    2. Open your Applications menu in Gnome/KDE Desktop and search for Docker Desktop.
    3. Select Docker Desktop to start Docker.
      The Docker menu () displays the Docker Subscription Service Agreement window.
    4. Select Accept to continue. Docker Desktop starts after you accept the terms. Note that Docker Desktop will not run if you do not agree to the terms. You can choose to accept the terms at a later date by opening Docker Desktop. For more information, see Docker Desktop Subscription Service Agreement. We recommend that you also read the FAQs.

    Where to go next

    • Troubleshooting describes common problems, workarounds, how to run and submit diagnostics, and submit issues.
    • FAQs provide answers to frequently asked questions.
    • Release notes lists component updates, new features, and improvements associated with Docker Desktop releases.
    • Get started with Docker provides a general Docker tutorial.
    • Back up and restore data provides instructions on backing up and restoring data related to Docker.

    Источник

    How To Install and Use Docker Desktop on Ubuntu and Linux Mint

    Docker Desktop is an easy-to-use cross-platform GUI (Graphical User Interface) application used to manage Docker images, containers, and apps from your local computer. It can be utilized either independently or in conjunction with the command-line interface client.

    A comprehensive Docker development environment can be quickly installed and set up using Docker Desktop, which also supports a variety of programming languages and frameworks. It comes pre-installed with the most recent version of Kubernetes, the Docker engine, the Docker CLI client, Docker Buildx, Docker Compose, extensions, and the Docker Content Trust.

    With native Windows Hyper-V virtualization, it provides quick and dependable performance on Windows and lets you switch between the Linux and Windows Server environments with ease when developing applications. Additionally, it may operate natively on Linux on Windows computers via the Windows Subsystem for Linux 2 (also known as WSL 2).

    Besides, Docker Desktop offers file change notifications, volume mounting for code and data, and simple access to active containers on the local host network.

    This guide shows how to install Docker Desktop on Ubuntu and its derivatives, such as Linux Mint. Our test environment is Ubuntu 22.04.

    This guide shows how to install Docker Desktop on Ubuntu 22.04 and Ubuntu-based distributions such as Linux Mint.

    Prerequisites:

    • 64-bit kernel and CPU support for virtualization/KVM virtualization support.
    • QEMU must be version 5.2 or newer (but the latest version is recommended).
    • Systemd init system.
    • GNOME, KDE, or MATE Desktop environment.
    • At least 4 GB of RAM, and.
    • Enable configuring ID mapping in user namespaces.

    1. Checking KVM Virtualization Support in Ubuntu

    As mentioned under the prerequisite section above, Docker Desktop runs a virtual machine that requires KVM support. If the host has virtualization support, the KVM module should load automatically. But, you can load the module manually by running the following command:

    You can run the following commands depending on the processor of the host machine to load the corresponding module:

    $ modprobe kvm_intel [For Intel] $ modprobe kvm_amd [For AMD]

    To check if KVM acceleration can be used on your machine, issue the following command:

    Check KVM Virtualization Support in Ubuntu

    Next, also check if the KVM modules are enabled, by running the following command:

    Check KVM Modules

    Now that the prerequisites exist on your machine, proceed to install Docker Desktop as described in the sections that follow.

    2. Install Docker Repository in Ubuntu

    Now, run the following commands first to update the local package index, then install the required packages, create a repository to store the Docker APT repository key, install the key, and then set up the repository configuration file:

    $ sudo apt-get update $ sudo apt-get install ca-certificates curl gnupg lsb-release $ sudo mkdir -m 0755 -p /etc/apt/keyrings $ curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg $ echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null

    3. Install Docker Desktop on Ubuntu

    Next, download the Docker Desktop DEB package file using the wget command-line downloader as follows:

    $ wget -c https://desktop.docker.com/linux/main/amd64/docker-desktop-4.17.0-amd64.deb

    Then, once again update the local package index and install DEB package using the apt command as shown.

    $ sudo apt update $ sudo apt install ./docker-desktop-4.17.0-amd64.deb

    Note: Before you start running the application, remember that on Linux, Docker Desktop runs a Virtual Machine (VM) so it creates and uses a custom docker context desktop-linux on startup.

    Therefore, if you had deployed any images and containers on the Linux Docker Engine before the installation, they will not be available in Docker Desktop for Linux.

    3. Using Docker Desktop on Ubuntu

    Once the Docker Desktop application has been successfully installed, search for it in the Activities or Applications menu. Then click on it icon as shown in the following screenshot.

    Next, the Docker menu will display the Docker Subscription Service Agreement window, read through it and click Accept to proceed as highlighted in the next screenshot.

    Docker Subscription Service Agreement

    Starting Container Using Docker Desktop

    It’s time to run your first container using Docker Desktop by running the following command.

    $ docker run -d -p 80:80 docker/getting-started

    Running Docker Container

    After running the above command, you should now see a container running as shown in the next screenshot.

    Docker Container Running

    Click the expand arrow next to the port mapping, under the Port(s) column to view the simple static site running in the container, in your web browser.

    Site Running in Container

    Congratulations! You have successfully installed Docker Desktop on your Ubuntu machine and run a sample container. For more information, read through the Getting Started guide provided by the static site in the sample container or view the online documentation.

    Источник

Оцените статью
Adblock
detector