Add instructions on installing server and client binaries on Windows (#13676)

* Add instructions on installing server and client binaries on Windows:

Signed-off-by: Usha Mandya <usha.mandya@docker.com>

* Apply suggestions from code review

Co-authored-by: Sebastiaan van Stijn <thaJeztah@users.noreply.github.com>

Co-authored-by: Sebastiaan van Stijn <thaJeztah@users.noreply.github.com>
This commit is contained in:
Usha Mandya 2021-10-15 14:54:26 +01:00 committed by GitHub
parent 887f5b01ce
commit 5d3cb0e076
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 89 additions and 24 deletions

View File

@ -9,23 +9,43 @@ redirect_from:
- /installation/binaries/
---
> **Note**: You may have been redirected to this page because there is no longer
> a dynamically-linked Docker package for your Linux distribution.
> **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](../../desktop/index.md)
> instead. For Linux, we recommend that you follow the instructions specific for
> your distribution.
{: .important}
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.
Be aware that 32-bit static binary archives do not include the Docker daemon.
Static binaries for the Docker daemon binary are only available for Linux (as
`dockerd`).
Static binaries for the Docker client are available for Linux and macOS (as `docker`).
`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 both Linux and macOS:
This topic discusses binary installation for Linux, Windows, and macOS:
- [Install daemon and client binaries on Linux](#install-daemon-and-client-binaries-on-linux )
- [Install client binaries on macOS](#install-client-binaries-on-macos )
- [Install daemon and client binaries on Linux](#install-daemon-and-client-binaries-on-linux)
- [Install client binaries on macOS](#install-client-binaries-on-macos)
- [Install server and client binaries on Windows](#install-server-and-client-binaries-on-windows)
## Install daemon and client binaries on Linux
@ -78,8 +98,7 @@ instructions for enabling and configuring AppArmor or SELinux.
### Install static binaries
1. Download the static binary archive. Go to
[https://download.docker.com/linux/static/stable/](https://download.docker.com/linux/static/stable/)
(or change `stable` to `nightly` or `test`),
[https://download.docker.com/linux/static/stable/](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.
@ -120,13 +139,23 @@ instructions for enabling and configuring AppArmor or SELinux.
## Install client binaries on macOS
The macOS binary includes the Docker client only. It does not include the
`dockerd` daemon.
> **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](../../desktop/index.md) 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`, `docker scan`, 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/x86_64/](https://download.docker.com/mac/static/stable/x86_64/),
(or change `stable` to `nightly` or `test`),
and download the `.tgz` file relating to the version of Docker Engine you want
[https://download.docker.com/mac/static/stable/](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
@ -137,19 +166,13 @@ The macOS binary includes the Docker client only. It does not include the
```
3. Clear the extended attributes to allow it run.
In case executing `docker/docker` you get the error message: *'docker' is*
*damaged and cannot be opened. You should move it to the bin.*
Apple takes care about our security. Hence, we need to remove the security
mechanism preventing us running the executable.
```console
$ sudo xattr -rc docker
```
Now, when you run the following command, you can see the Docker CLI usage instructions:
```console
$ docker/docker
```
@ -173,6 +196,48 @@ The macOS binary includes the Docker client only. It does not include the
This command downloads a test image and runs it in a container. When the
container runs, it prints a message and exits.
## 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. The binaries for
> Windows do not contain Docker components such as `buildx`, `docker scan`, and
> `docker compose`. If you are running Windows 10 or 11, we recommend that you
> install [Docker Desktop](../../desktop/index.md) 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](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:
```powershell
PS C:\> Expand-Archive /path/to/<FILE>.zip -DestinationPath $Env:ProgramFiles
```
3. Register the service and start the Docker Engine:
```powershell
PS C:\> $Env:ProgramFiles\Docker\dockerd --register-service
PS C:\> Start-Service docker
```
4. Verify that Docker is installed correctly by running the `hello-world`
image.
```powershell
PS C:\> $Env:ProgramFiles\Docker\docker run hello-world:nanoserver
```
This command downloads a test image and runs it in a container. When the
container runs, it prints a message and exits.
## Upgrade static binaries
To upgrade your manual installation of Docker Engine, first stop any