How to install docker on Ubuntu 16.04 and windows 10 home edition

osc_1i3ltp99 2020-11-10 07:37:12
install docker ubuntu windows home


Before that https://blog.csdn.net/fengbingchun/article/details/109559500 Chinese vs Docker Made a brief introduction , Here's an introduction Docker stay Ubuntu16.04 x86_64 64 On the position and Windows10 x86_64 64 Installation process on bit Home Edition .

stay Ubuntu Installation on Docker( or Docker engine ),Ubuntu Must be 64 Bit , the latest version Docker 19.03.13 Support only Ubuntu Version is 16.04、18.04、20.04. stay Ubuntu Installation on Docker There are three ways :(1). adopt Docker Warehouse ;(2). By downloading .deb file ;(3). Through script . Here is the installation of the first method .

If in Windows10 Non home version ( pro 、 Corporate or educational ) Installation on Docker( or Docker engine ), Requirements :(1).Windows10 The version number is 16299 And above ;(2). Must be turned on Hyper-V And container features ;(3). Having secondary address translation 64 Bit processor (64 bit processor with Second Level Address Translation (SLAT));(4). System memory cannot be lower than 4GB;(5). Must be in BIOS Enable... In settings BIOS Class II hardware virtualization support .

If in Widnows10 It's the home version Docker( or Docker engine ), Requirements :(1).Windows10 The version number is 1903 And above ;(2). stay Windows10 Enable on WSL(Windows Subsystem for Linux) 2 function ;(3). Having secondary address translation 64 Bit processor ;(4). System memory cannot be lower than 4GB;(5). Must be in BIOS Enable... In settings BIOS Class II hardware virtualization support .

stay Windows10 64 Install on bit home edition WSL 2 Operation steps :

(1). Enable for Linux Of Windows Subsystem , Open as administrator Windows PowerShell, And execute the following command :

dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart

(2). Enable virtual machine features , Open as administrator Windows PowerShell, And execute the following command :

dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart

(3). Restart the computer ;

(4). from https://docs.microsoft.com/zh-cn/windows/wsl/install-win10 download Linux Kernel update package wsl_update_x64.msi And install ;

(5). take WSL 2 Set to default version , open PowerShell, And execute the following command :

wsl --set-default-version 2

1. stay Ubuntu16.04 64 Install on the virtual machine Docker:

(1). If you have installed an older version of Docker, You should uninstall the old version first , Execute the following command to uninstall :

sudo apt-get remove docker docker-engine docker.io containerd runc

After executing the above order /var/lib/docker Contents under the directory , Including images 、 Containers 、 Files like volumes and networks still exist , If you don't need to save the existing data , And hope to start with a new installation , You need to continue with the following command :

sudo apt-get purge docker-ce docker-ce-cli containerd.io
sudo rm -rf /var/lib/docker

(2). Set up Docker Warehouse (repository), Execute the following command :

sudo apt-get update
sudo apt-get install apt-transport-https ca-certificates curl gnupg-agent software-properties-common

(3). add to Docker official GPG secret key , Execute the following command :

curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -

(4). Set up a stable warehouse (stable repository), Add stable version of Docker APT Mirror source , Execute the following command :

sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"

(5). install Docker engine , Execute the following commands in turn :

sudo apt-get update
sudo apt-get install docker-ce docker-ce-cli containerd.io

(6). verification Docker Whether the engine is installed correctly , Execute the following command , The execution result is shown in the figure below , Instructions are correctly installed Docker engine :

sudo docker run hello-world

(7). If you want to use non root User identity use Docker, You need to establish docker User group , And add the current user to docker Group , Execute the following command , Log out and log in again :

sudo groupadd docker
sudo usermod -aG docker $USER

notes : If you use Docker Official source https://download.docker.com/linux/ubuntu Slow download , You can switch it to a domestic source , If the above paragraph 3 And the first step 4 In step https://download.docker.com/linux/ubuntu, Replace all with https://mirrors.ustc.edu.cn/docker-ce/linux/ubuntu/ that will do .

2. stay Windows10 64 Install on bit home edition Docker:

(1). stay Windows10 64 Install on bit home edition WSL 2;

(2). from https://hub.docker.com/editions/community/docker-ce-desktop-windows/ Download stable Version of Docker Desktop Installer.exe;

(3). Double click installation Docker Desktop Installer.exe, Check it out. " Enable WSL 2 function " Options ;

(4). Restart or log off the computer ;

(5). double-click "Docker Desktop" start-up Docker;

(6). Open as administrator Windows PowerShell, Enter the command "docker version", The results are as follows :

(7). verification Docker Whether the engine is installed correctly , Carry out orders "docker run hello-world", The execution result is shown in the figure below , Instructions are correctly installed Docker engine :

 

版权声明
本文为[osc_1i3ltp99]所创,转载请带上原文链接,感谢

  1. 【计算机网络 12(1),尚学堂马士兵Java视频教程
  2. 【程序猿历程,史上最全的Java面试题集锦在这里
  3. 【程序猿历程(1),Javaweb视频教程百度云
  4. Notes on MySQL 45 lectures (1-7)
  5. [computer network 12 (1), Shang Xuetang Ma soldier java video tutorial
  6. The most complete collection of Java interview questions in history is here
  7. [process of program ape (1), JavaWeb video tutorial, baidu cloud
  8. Notes on MySQL 45 lectures (1-7)
  9. 精进 Spring Boot 03:Spring Boot 的配置文件和配置管理,以及用三种方式读取配置文件
  10. Refined spring boot 03: spring boot configuration files and configuration management, and reading configuration files in three ways
  11. 精进 Spring Boot 03:Spring Boot 的配置文件和配置管理,以及用三种方式读取配置文件
  12. Refined spring boot 03: spring boot configuration files and configuration management, and reading configuration files in three ways
  13. 【递归,Java传智播客笔记
  14. [recursion, Java intelligence podcast notes
  15. [adhere to painting for 386 days] the beginning of spring of 24 solar terms
  16. K8S系列第八篇(Service、EndPoints以及高可用kubeadm部署)
  17. K8s Series Part 8 (service, endpoints and high availability kubeadm deployment)
  18. 【重识 HTML (3),350道Java面试真题分享
  19. 【重识 HTML (2),Java并发编程必会的多线程你竟然还不会
  20. 【重识 HTML (1),二本Java小菜鸟4面字节跳动被秒成渣渣
  21. [re recognize HTML (3) and share 350 real Java interview questions
  22. [re recognize HTML (2). Multithreading is a must for Java Concurrent Programming. How dare you not
  23. [re recognize HTML (1), two Java rookies' 4-sided bytes beat and become slag in seconds
  24. 造轮子系列之RPC 1:如何从零开始开发RPC框架
  25. RPC 1: how to develop RPC framework from scratch
  26. 造轮子系列之RPC 1:如何从零开始开发RPC框架
  27. RPC 1: how to develop RPC framework from scratch
  28. 一次性捋清楚吧,对乱糟糟的,Spring事务扩展机制
  29. 一文彻底弄懂如何选择抽象类还是接口,连续四年百度Java岗必问面试题
  30. Redis常用命令
  31. 一双拖鞋引发的血案,狂神说Java系列笔记
  32. 一、mysql基础安装
  33. 一位程序员的独白:尽管我一生坎坷,Java框架面试基础
  34. Clear it all at once. For the messy, spring transaction extension mechanism
  35. A thorough understanding of how to choose abstract classes or interfaces, baidu Java post must ask interview questions for four consecutive years
  36. Redis common commands
  37. A pair of slippers triggered the murder, crazy God said java series notes
  38. 1、 MySQL basic installation
  39. Monologue of a programmer: despite my ups and downs in my life, Java framework is the foundation of interview
  40. 【大厂面试】三面三问Spring循环依赖,请一定要把这篇看完(建议收藏)
  41. 一线互联网企业中,springboot入门项目
  42. 一篇文带你入门SSM框架Spring开发,帮你快速拿Offer
  43. 【面试资料】Java全集、微服务、大数据、数据结构与算法、机器学习知识最全总结,283页pdf
  44. 【leetcode刷题】24.数组中重复的数字——Java版
  45. 【leetcode刷题】23.对称二叉树——Java版
  46. 【leetcode刷题】22.二叉树的中序遍历——Java版
  47. 【leetcode刷题】21.三数之和——Java版
  48. 【leetcode刷题】20.最长回文子串——Java版
  49. 【leetcode刷题】19.回文链表——Java版
  50. 【leetcode刷题】18.反转链表——Java版
  51. 【leetcode刷题】17.相交链表——Java&python版
  52. 【leetcode刷题】16.环形链表——Java版
  53. 【leetcode刷题】15.汉明距离——Java版
  54. 【leetcode刷题】14.找到所有数组中消失的数字——Java版
  55. 【leetcode刷题】13.比特位计数——Java版
  56. oracle控制用户权限命令
  57. 三年Java开发,继阿里,鲁班二期Java架构师
  58. Oracle必须要启动的服务
  59. 万字长文!深入剖析HashMap,Java基础笔试题大全带答案
  60. 一问Kafka就心慌?我却凭着这份,图灵学院vip课程百度云