- Установка Docker на Windows
- Что нужно знать перед установкой Docker на Windows?
- Установка Docker на Windows 10
- Install Docker for Windows
- Step 1: Check your version
- For Windows 8 or 8.1
- For Windows 7
- Step 2: Install Docker Toolbox
- Шаг 3: Проверка установки
- Ищите решение проблем?
- How to uninstall Toolbox
- Install Docker for Windows
- Step 1: Check your version
- Step 2: Install Docker Toolbox
- Step 3: Verify your installation
- Looking for troubleshooting help?
- How to uninstall Toolbox
Установка Docker на Windows
Обновл. 13 Апр 2021 |
Docker Desktop для Windows — это нативное Windows-приложение, которое предоставляет среду для сборки и запуска контейнеризированных приложений. В его основе лежат нативная Hyper-V виртуализация и сеть, что является наиболее быстрым и стабильным вариантом для работы с Docker в Windows. Docker Desktop для Windows поддерживает как Windows-, так и Linux-контейнеры.
Что нужно знать перед установкой Docker на Windows?
Нам потребуется операционная система Windows 10 версии Корпоративная, Профессиональная или Образовательная. Также должны быть подключены компоненты Hyper-V и Windows Containers. Для работы с этими компонентами система должна выполнять следующие требования:
64-разрядный процессор с поддержкой преобразования адресов второго уровня (сокр. «SLAT» от англ. «Second Level Address Translation»).
Не менее 4 ГБ оперативной памяти.
Поддержка аппаратной виртуализации на уровне BIOS.
Есть два способа проверить, включена ли у вас виртуализация на уровне BIOS.
Способ №1: Посмотреть в «Диспетчер задач» > «Производительность» в поле «Виртуализация» должно быть значение «Включено» :
Способ №2: Воспользоваться утилитой systeminfo . Для этого нужно открыть приложение Windows Powershell или Командную строку с правами администратора ( Win+R ) и запустить команду systeminfo . Нас интересует последний пункт — «Требования Hyper-V» , где значением каждого подпункта должно быть «Да» :
Наличие технологии Microsoft Hyper-V является обязательным условием для установки Docker в Windows. Инсталлятор Docker для Windows предложит вам включить нужные компоненты и перезагрузить вашу машину.
Примечание: Если у вас на компьютере было установлено бесплатное ПО виртуализации VirtualBox, то после включения компонента Hyper-V VirtualBox перестанет работать, при этом все образы ваших виртуальных машин будут сохранены.
Docker для Windows включает в себя следующие компоненты:
Docker CLI клиент
Контейнеры и образы, созданные с помощью Docker Desktop для Windows, доступны всем пользователям машины, на которую он установлен, так как все пользователи используют одну и ту же виртуальную машину для сборки и запуска контейнеров.
Установка Docker на Windows 10
Существует два варианта установки Docker на Windows:
Приложение «Docker Toolbox for Windows».
Приложение «Docker for Windows».
Примечание: Обратите внимание, что «Docker Toolbox for Windows» является устаревшим решением, которым вы можете воспользоваться, если ваш компьютер не удовлетворяет требованиям установки «Docker for Windows». Более детально об установке Docker Toolbox вы можете прочитать здесь.
На этом уроке мы установим Docker через приложение «Docker for Windows», так как это решение является наиболее стабильным и надежным. Итак, сначала нам нужно скачать установщик.
Далее запускаем инсталлятор Docker Desktop Installer.exe . Следуйте инструкциям мастера установки, дайте установщику разрешение на использование прав администратора и дождитесь окончания установки.
Примечание: Приложению Docker права администратора нужны для того, чтобы установить сетевые компоненты, создать ссылки на само приложение и дать возможность Hyper-V управлять виртуальными машинами.
Чтобы запустить Docker Desktop, воспользуйтесь поиском в Windows:
Индикатором запуска Docker является иконка «кита», появившаяся в системном трее:
Если иконка «кита» скрыта в системном трее, то нажмите на стрелочку вверх, чтобы посмотреть все иконки. После установки Docker Desktop вы также получите всплывающее уведомление о том, что Docker установлен и готов к работе:
После того, как инициализация закончена, нажмите на иконку «кита» в системном трее и выберите пункт «About Docker Desktop» , чтобы проверить, что вы используете последнюю версию Docker.
Поздравляю! Вы успешно установили Docker Desktop на Windows.
Поделиться в социальных сетях:
Install Docker for Windows
Windows users use Docker Toolbox to install Docker software. Docker Toolbox includes the following Docker tools:
- Docker CLI client for running Docker Engine to create images and containers
- Docker Machine so you can run Docker Engine commands from Windows terminals
- Docker Compose for running the docker-compose command
- Kitematic, the Docker GUI
- the Docker QuickStart shell preconfigured for a Docker command-line environment
- Oracle VM VirtualBox
Because the Docker Engine daemon uses Linux-specific kernel features, you can’t run Docker Engine natively in Windows. Instead, you must use the Docker Machine command, docker-machine , to create and attach to a small Linux VM on your machine. This VM hosts Docker Engine for you on your Windows system.
Step 1: Check your version
To run Docker, your machine must have a 64-bit operating system running Windows 7 or higher. Additionally, you must make sure that virtualization is enabled on your machine. To verify your machine meets these requirements, do the following:
Right click the windows message and choose System.
If you aren’t using a supported version, you could consider upgrading your operating system.
If you have a newer system, specifically 64bit Windows 10 Pro, with Enterprise and Education (1511 November update, Build 10586 or later), consider using Docker for Windows instead. It runs natively on the Windows, so there is no need for a pre-configured Docker QuickStart shell. It also uses Hyper-V for virtualization, so the instructions below for checking virtualization will be out of date for newer Windows systems. Full install prerequisites are provided in the Docker for Windows topic in What to know before you install.
Make sure your Windows system supports Hardware Virtualization Technology and that virtualization is enabled.
For Windows 8 or 8.1
Choose Start > Task Manager and navigate to the Performance tab. Under CPU you should see the following:
If virtualization is not enabled on your system, follow the manufacturer’s instructions for enabling it.
For Windows 7
Verify your Windows OS is 64-bit (x64)
How you do this verification depends on your Windows version. For details, see the Windows article How to determine whether a computer is running a 32-bit version or 64-bit version of the Windows operating system.
Step 2: Install Docker Toolbox
In this section, you install the Docker Toolbox software and several “helper” applications. The installation adds the following software to your machine:
- Docker Client for Windows
- Docker Toolbox management tool and ISO
- Oracle VM VirtualBox
- Git MSYS-git UNIX tools
If you have a previous version of VirtualBox installed, do not reinstall it with the Docker Toolbox installer. When prompted, uncheck it.
If you have Virtual Box running, you must shut it down before running the installer.
Click the installer link to download.
Install Docker Toolbox by double-clicking the installer.
The installer launches the “Setup — Docker Toolbox” dialog.
If Windows security dialog prompts you to allow the program to make a change, choose Yes. The system displays the Setup — Docker Toolbox for Windows wizard.
Press Next to accept all the defaults and then Install.
Accept all the installer defaults. The installer takes a few minutes to install all the components:
When notified by Windows Security the installer will make changes, make sure you allow the installer to make the necessary changes.
When it completes, the installer reports it was successful:
Uncheck “View Shortcuts in File Explorer” and press Finish.
Шаг 3: Проверка установки
The installer places Docker Toolbox and VirtualBox in your Applications folder. In this step, you start Docker Toolbox and run a simple Docker command.
On your Desktop, find the Docker Toolbox icon.
Click the icon to launch a Docker Toolbox terminal.
If the system displays a User Account Control prompt to allow VirtualBox to make changes to your computer. Choose Yes.
The terminal does several things to set up Docker Toolbox for you. When it is done, the terminal displays the $ prompt.
The terminal runs a special bash environment instead of the standard Windows command prompt. The bash environment is required by Docker.
Make the terminal active by click your mouse next to the $ prompt.
If you aren’t familiar with a terminal window, here are some quick tips.
The prompt is traditionally a $ dollar sign. You type commands into the command line which is the area after the prompt. Your cursor is indicated by a highlighted area or a | that appears in the command line. After typing a command, always press RETURN.
Type the docker run hello-world command and press RETURN.
The command does some work for you, if everything runs well, the command’s output looks like this:
Ищите решение проблем?
Typically, the above steps work out-of-the-box, but some scenarios can cause problems. If your docker run hello-world didn’t work and resulted in errors, check out Troubleshooting for quick fixes to common problems.
A Windows specific problem you might encounter has to do with the NDIS6 host network filter driver, which is known to cause issues on some Windows versions. For Windows Vista systems and newer, VirtualBox installs NDIS6 driver by default. Issues can range from system slowdowns to networking problems for the virtual machine (VM). If you notice problems, re-run the Docker Toolbox installer, and select the option to install VirtualBox with the NDIS5 driver.
How to uninstall Toolbox
Removing Toolbox involves removing all the Docker components it includes.
A full uninstall also includes removing the local and remote machines you created with Docker Machine. In some cases, you might want to keep machines created with Docker Machine.
For example, if you plan to re-install Docker Machine as a part of Docker for Windows you can continue to manage those machines through Docker. Or, if you have remote machines on a cloud provider and you plan to manage them using the provider, you wouldn’t want to remove them. So the step to remove machines is described here as optional.
To uninstall Toolbox on Windows, do the following:
List your machines.
Optionally, remove each machine. For example:
Uninstall Docker Toolbox using Windowâs standard process for uninstalling programs through the control panel.
Note: This process does not remove the docker-install.exe file. You must delete that file yourself.
Пожалуйста, авторизуйтесь что бы оставлять комментарии.
Install Docker for Windows
Windows users use Docker Toolbox to install Docker software. Docker Toolbox includes the following Docker tools:
- Docker CLI client for running Docker Engine to create images and containers
- Docker Machine so you can run Docker Engine commands from Windows terminals
- Docker Compose for running the docker-compose command
- Kitematic, the Docker GUI
- the Docker QuickStart shell preconfigured for a Docker command-line environment
- Oracle VM VirtualBox
Because the Docker Engine daemon uses Linux-specific kernel features, you can’t run Docker Engine natively in Windows. Instead, you must use the Docker Machine command, docker-machine , to create and attach to a small Linux VM on your machine. This VM hosts Docker Engine for you on your Windows system.
Step 1: Check your version
To run Docker, your machine must have a 64-bit operating system running Windows 7 or higher. Additionally, you must make sure that virtualization is enabled on your machine. To verify your machine meets these requirements, do the following:
Right click the windows message and choose System.
If you aren’t using a supported version, you could consider upgrading your operating system.
If you have a newer system, specifically 64bit Windows 10 Pro, with Enterprise and Education (1511 November update, Build 10586 or later), consider using Docker for Windows instead. It runs natively on the Windows, so there is no need for a pre-configured Docker QuickStart shell. It also uses Hyper-V for virtualization, so the instructions below for checking virtualization will be out of date for newer Windows systems. Full install prerequisites are provided in the Docker for Windows topic in What to know before you install.
Make sure your Windows system supports Hardware Virtualization Technology and that virtualization is enabled.
For Windows 8 or 8.1
Choose Start > Task Manager and navigate to the Performance tab. Under CPU you should see the following:
If virtualization is not enabled on your system, follow the manufacturer’s instructions for enabling it.
For Windows 7
Verify your Windows OS is 64-bit (x64)
How you do this verification depends on your Windows version. For details, see the Windows article How to determine whether a computer is running a 32-bit version or 64-bit version of the Windows operating system.
Step 2: Install Docker Toolbox
In this section, you install the Docker Toolbox software and several “helper” applications. The installation adds the following software to your machine:
- Docker Client for Windows
- Docker Toolbox management tool and ISO
- Oracle VM VirtualBox
- Git MSYS-git UNIX tools
If you have a previous version of VirtualBox installed, do not reinstall it with the Docker Toolbox installer. When prompted, uncheck it.
If you have Virtual Box running, you must shut it down before running the installer.
Click the installer link to download.
Install Docker Toolbox by double-clicking the installer.
The installer launches the “Setup — Docker Toolbox” dialog.
If Windows security dialog prompts you to allow the program to make a change, choose Yes. The system displays the Setup — Docker Toolbox for Windows wizard.
Press Next to accept all the defaults and then Install.
Accept all the installer defaults. The installer takes a few minutes to install all the components:
When notified by Windows Security the installer will make changes, make sure you allow the installer to make the necessary changes.
When it completes, the installer reports it was successful:
Uncheck “View Shortcuts in File Explorer” and press Finish.
Step 3: Verify your installation
The installer places Docker Toolbox and VirtualBox in your Applications folder. In this step, you start Docker Toolbox and run a simple Docker command.
On your Desktop, find the Docker Toolbox icon.
Click the icon to launch a Docker Toolbox terminal.
If the system displays a User Account Control prompt to allow VirtualBox to make changes to your computer. Choose Yes.
The terminal does several things to set up Docker Toolbox for you. When it is done, the terminal displays the $ prompt.
The terminal runs a special bash environment instead of the standard Windows command prompt. The bash environment is required by Docker.
Make the terminal active by click your mouse next to the $ prompt.
If you aren’t familiar with a terminal window, here are some quick tips.
The prompt is traditionally a $ dollar sign. You type commands into the command line which is the area after the prompt. Your cursor is indicated by a highlighted area or a | that appears in the command line. After typing a command, always press RETURN.
Type the docker run hello-world command and press RETURN.
The command does some work for you, if everything runs well, the command’s output looks like this:
Looking for troubleshooting help?
Typically, the above steps work out-of-the-box, but some scenarios can cause problems. If your docker run hello-world didn’t work and resulted in errors, check out Troubleshooting for quick fixes to common problems.
A Windows specific problem you might encounter has to do with the NDIS6 host network filter driver, which is known to cause issues on some Windows versions. For Windows Vista systems and newer, VirtualBox installs NDIS6 driver by default. Issues can range from system slowdowns to networking problems for the virtual machine (VM). If you notice problems, re-run the Docker Toolbox installer, and select the option to install VirtualBox with the NDIS5 driver.
How to uninstall Toolbox
Removing Toolbox involves removing all the Docker components it includes.
A full uninstall also includes removing the local and remote machines you created with Docker Machine. In some cases, you might want to keep machines created with Docker Machine.
For example, if you plan to re-install Docker Machine as a part of Docker for Windows you can continue to manage those machines through Docker. Or, if you have remote machines on a cloud provider and you plan to manage them using the provider, you wouldn’t want to remove them. So the step to remove machines is described here as optional.
To uninstall Toolbox on Windows, do the following:
List your machines.
Optionally, remove each machine. For example:
Uninstall Docker Toolbox using Window’s standard process for uninstalling programs through the control panel.