Linux ubuntu установить docker

Install Docker Engine from binaries

Important

This page contains information on how to install Docker using binaries. These instructions are mostly suitable for testing purposes. We do not recommend installing Docker using binaries in production environments as they will not be updated automatically with security updates. The Linux binaries described on this page are statically linked, which means that vulnerabilities in build-time dependencies are not automatically patched by security updates of your Linux distribution.

Updating binaries is also slightly more involved when compared to Docker packages installed using a package manager or through Docker Desktop, as it requires (manually) updating the installed version whenever there is a new release of Docker.

Also, static binaries may not include all functionalities provided by the dynamic packages.

On Windows and Mac, we recommend that you install Docker Desktop instead. For Linux, we recommend that you follow the instructions specific for your distribution.

If you want to try Docker or use it in a testing environment, but you’re not on a supported platform, you can try installing from static binaries. If possible, you should use packages built for your operating system, and use your operating system’s package management system to manage Docker installation and upgrades.

Static binaries for the Docker daemon binary are only available for Linux (as dockerd ) and Windows (as dockerd.exe ). Static binaries for the Docker client are available for Linux, Windows, and macOS (as docker ).

This topic discusses binary installation for Linux, Windows, and macOS:

Install daemon and client binaries on Linux

Prerequisites

Before attempting to install Docker from binaries, be sure your host machine meets the prerequisites:

  • A 64-bit installation
  • Version 3.10 or higher of the Linux kernel. The latest version of the kernel available for your platform is recommended.
  • iptables version 1.4 or higher
  • git version 1.7 or higher
  • A ps executable, usually provided by procps or a similar package.
  • XZ Utils 4.9 or higher
  • A properly mounted cgroupfs hierarchy; a single, all-encompassing cgroup mount point is not sufficient. See Github issues #2683, #3485, #4568).
Читайте также:  Создать архив папки linux zip

Secure your environment as much as possible

OS considerations

Enable SELinux or AppArmor if possible.

It is recommended to use AppArmor or SELinux if your Linux distribution supports either of the two. This helps improve security and blocks certain types of exploits. Review the documentation for your Linux distribution for instructions for enabling and configuring AppArmor or SELinux.

Security Warning

If either of the security mechanisms is enabled, do not disable it as a work-around to make Docker or its containers run. Instead, configure it correctly to fix any problems.

Docker daemon considerations
  • Enable seccomp security profiles if possible. See Enabling seccomp for Docker.
  • Enable user namespaces if possible. See the Daemon user namespace options.

Install static binaries

  1. Download the static binary archive. Go to https://download.docker.com/linux/static/stable/, choose your hardware platform, and download the .tgz file relating to the version of Docker Engine you want to install.
  2. Extract the archive using the tar utility. The dockerd and docker binaries are extracted.
$ sudo docker run hello-world 

You have now successfully installed and started Docker Engine.

Tip

Receiving errors when trying to run without root?

The docker user group exists but contains no users, which is why you’re required to use sudo to run Docker commands. Continue to Linux postinstall to allow non-privileged users to run Docker commands and for other optional configuration steps.

Install client binaries on macOS

Note

The following instructions are mostly suitable for testing purposes. The macOS binary includes the Docker client only. It does not include the dockerd daemon which is required to run containers. Therefore, we recommend that you install Docker Desktop instead.

The binaries for Mac also do not contain:

  • A runtime environment. You must set up a functional engine either in a Virtual Machine, or on a remote Linux machine.
  • Docker components such as buildx and docker compose .

To install client binaries, perform the following steps:

  1. Download the static binary archive. Go to https://download.docker.com/mac/static/stable/ and select x86_64 (for Mac on Intel chip) or aarch64 (for Mac on Apple silicon), and then download the .tgz file relating to the version of Docker Engine you want to install.
  2. Extract the archive using the tar utility. The docker binary is extracted.
$ sudo cp docker/docker /usr/local/bin/ 
$ sudo docker -H hostname> run hello-world 

Install server and client binaries on Windows

Note

The following section describes how to install the Docker daemon on Windows Server which allows you to run Windows containers only. When you install the Docker daemon on Windows Server, the daemon doesn’t contain Docker components such as buildx and compose . If you are running Windows 10 or 11, we recommend that you install Docker Desktop instead.

Binary packages on Windows include both dockerd.exe and docker.exe . On Windows, these binaries only provide the ability to run native Windows containers (not Linux containers).

To install server and client binaries, perform the following steps:

  1. Download the static binary archive. Go to https://download.docker.com/win/static/stable/x86_64 and select the latest version from the list.
  2. Run the following PowerShell commands to install and extract the archive to your program files:
 PS C:\> Expand-Archive /path/to/FILE>.zip -DestinationPath $Env:ProgramFiles 
 PS C:\> &$Env:ProgramFiles\Docker\dockerd --register-service PS C:\> Start-Service docker 
PS C:\> &$Env:ProgramFiles\Docker\docker run hello-world:nanoserver 

Upgrade static binaries

To upgrade your manual installation of Docker Engine, first stop any dockerd or dockerd.exe processes running locally, then follow the regular installation steps to install the new version on top of the existing version.

Next steps

  • Continue to Post-installation steps for Linux.
  • Review the topics in Develop with Docker to learn how to build new applications using Docker.

Источник

Install Docker Engine

Docker Desktop for Linux

Docker Desktop helps you build, share, and run containers on Mac and Windows as you do on Linux. Docker Desktop for Linux is now GA. For more information, see Docker Desktop for Linux.

Supported platforms

Docker Engine is available on a variety of Linux distros, macOS, and Windows 10 through Docker Desktop, and as a static binary installation. Find your preferred operating system below.

Desktop

Server

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

Platform x86_64 / amd64 arm64 / aarch64 arm (32-bit) s390x
CentOS
Debian
Fedora
Raspbian
RHEL
SLES
Ubuntu
Binaries

Other Linux distros

Note

While the instructions below may work, Docker doesn’t test or verify installation on distro derivatives.

  • Users of Debian derivatives such as “BunsenLabs Linux”, “Kali Linux” or “LMDE” (Debian-based Mint) should follow the installation instructions for Debian, substituting the version of their distro for the corresponding Debian release. Refer to the documentation of your distro to find which Debian release corresponds with your derivative version.
  • Likewise, users of Ubuntu derivatives such as “Kubuntu”, “Lubuntu” or “Xubuntu” should follow the installation instructions for Ubuntu, substituting the version of their distro for the corresponding Ubuntu release. Refer to the documentation of your distro to find which Ubuntu release corresponds with your derivative version.
  • Some Linux distros provide a package of Docker Engine through their package repositories. These packages are built and maintained by the Linux distro’s package maintainers and may have differences in configuration or built from modified source code. Docker isn’t involved in releasing these packages and you should report any bugs or issues involving these packages to your Linux distro’s issue tracker.

Docker provides binaries for manual installation of Docker Engine. These binaries are statically linked and you can use them on any Linux distro.

Release channels

Docker Engine has two types of update channels, stable and test:

  • The Stable channel gives you the latest versions released for general availability.
  • The Test channel gives you pre-release versions that are ready for testing before general availability.

Use the test channel with caution. Pre-release versions include experimental and early-access features that are subject to breaking changes.

Support

Docker Engine is an open source project, supported by the Moby project maintainers and community members. Docker doesn’t provide support for Docker Engine. Docker provides support for Docker products, including Docker Desktop, which uses Docker Engine as one of its components.

For information about the open source project, refer to the Moby project website.

Upgrade path

Patch releases are always backward compatible with its major and minor version.

Licensing

Docker Engine is licensed under the Apache License, Version 2.0. See LICENSE for the full license text.

Reporting security issues

If you discover a security issue, we request that you bring it to our attention immediately.

DO NOT file a public issue. Instead, submit your report privately to security@docker.com.

Security reports are greatly appreciated, and Docker will publicly thank you for it.

Get started

After setting up Docker, you can learn the basics with Getting started with Docker.

Источник

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