安装

  1. 下载
wget https://download.docker.com/linux/static/stable/x86_64/docker-18.06.1-ce.tgz
  1. 解压
tar -xvf docker-18.06.1-ce.tgz
  1. 将解压出来的docker文件内容移动到 /usr/bin/ 目录下
cp docker/* /usr/bin/
  1. 将docker注册为service:vim /etc/systemd/system/docker.service
[Unit]
Description=Docker Application Container Engine
Documentation=https://docs.docker.com
After=network-online.target firewalld.service
Wants=network-online.target
[Service]
Type=notify
# the default is not to use systemd for cgroups because the delegate issues still
# exists and systemd currently does not support the cgroup feature set required
# for containers run by docker
ExecStart=/usr/bin/dockerd
ExecReload=/bin/kill -s HUP $MAINPID
# Having non-zero Limit*s causes performance problems due to accounting overhead
# in the kernel. We recommend using cgroups to do container-local accounting.
LimitNOFILE=infinity
LimitNPROC=infinity
LimitCORE=infinity
# Uncomment TasksMax if your systemd version supports it.
# Only systemd 226 and above support this version.
#TasksMax=infinity
TimeoutStartSec=0
# set delegate yes so that systemd does not reset the cgroups of docker containers
Delegate=yes
# kill only the docker process, not all processes in the cgroup
KillMode=process
# restart the docker process if it exits prematurely
Restart=on-failure
StartLimitBurst=3
StartLimitInterval=60s
[Install]
WantedBy=multi-user.target

启动

chmod +x /etc/systemd/system/docker.service #添加文件权限并启动docker
systemctl daemon-reload #重新加载配置文件
systemctl start docker #启动Docker
systemctl enable docker.service #设置开机自启

验证

systemctl status docker         #查看Docker状态
docker -v #查看Docker版本

结语

欢迎关注微信公众号『码仔zonE』,专注于分享Java、云计算相关内容,包括SpringBoot、SpringCloud、微服务、Docker、Kubernetes、Python等领域相关技术干货,期待与您相遇!

Linux环境安装Docker入门教程的更多相关文章

  1. linux环境安装docker,部署应用

    安装: 1.Docker要求CentOS系统的内核版本高于 3.10 ,通过 uname -r 命令查看你当前的内核版本是否支持安账docker 2.更新yum包:sudo yum update 3. ...

  2. Unix/Linux环境C编程入门教程(3) Oracle Linux 环境搭建

    Unix/Linux版本众多,我们推荐Unix/Linux初学者选用几款典型的Unix/Linux操作系统进行学习. 2010年9月,Oracle Enterprise Linux发布新版内核--Un ...

  3. Linux环境安装Docker

    1. 使用APT安装 # 更新数据源 apt-get update # 安装所需依赖 apt-get -y install apt-transport-https ca-certificates cu ...

  4. Unix/Linux环境C编程入门教程(32) 环境变量那些事儿

    1. getenv() putenv()setenv()函数介绍 getenv(取得环境变量内容) 相关函数 putenv,setenv,unsetenv 表头文件 #include<stdli ...

  5. Unix/Linux环境C编程入门教程(9) unbntu CCPP开发环境搭建

    1.      首先启动VMware,如果没有安装,请查看前面VMware的安装视频 2 启动虚拟机向导,选择自定义 3 单击下一步 4 选择稍后安装操作系统 5 .选择unbntu 64linux ...

  6. Unix/Linux环境C编程入门教程(24) MySQL 5.7.4 for Red Hat Enterprise 7(RHEL7)的安装

    远观历史, MySQL的主要目的是为了能够在单处理器核心的商业服务器上运行.如今MySQL的一个变化用户可能不会注意到,那就是甲骨文已经开始重新架构MySQL的代码,使它大量的模块化.如软件解析器,优 ...

  7. Unix/Linux环境C编程入门教程(6) 安装Fedora C/C++开发环境

    安装Fedora  C/C++开发环境 1 Fedora 是一个开放的.创新的.前瞻性的操作系统和平台,基于 Linux. 2.选择自定义配置 3.设置版本为10.0 4.选择稍后安装 5.选择64位 ...

  8. Unix/Linux环境C编程入门教程(13) 开发环境搭建VMware软件安装

    VMware(中文名威睿",纽约证券交易所"代码:VMW) 虚拟机软件,是全球桌面到数据中心虚拟化解决方案的领导厂商.全球不同规模的客户依靠VMware来降低成本和运营费用.确保业 ...

  9. Unix/Linux环境C编程入门教程(11) 开发环境搭建VMWare虚拟安装之虚拟化检测

    常开启虚拟化技术.如果你的主板是最新的,它在冷启动后能够检测到配置变化.每当我改变我的主板上的VT设置,它都会自动推迟下次重新启动生效.如何确定VT已经开启或禁用? 如图表示成功开启了VT. F10 ...

随机推荐

  1. 羞羞的Python模块包

    目录 一.pip 二.pip常用命令 三.No module 'xxxxx' 四.写在最后   前言 写Python代码的时候,经常会遇到包的问题,但是都是遇到一次,搜索一次,解决了.下一次还是同样的 ...

  2. shell 十三问

    经典的Shell十三问 摘选整理自:http://bbs.chinaunix.net/thread-218853-1-1.htmlhttps://github.com/wzb56/13_questio ...

  3. LQB201808全球变暖 bfs

    #include<iostream> #include<stdio.h> #include<stdlib.h> #include<time.h> #in ...

  4. 零起点PYTHON机器学习快速入门 PDF |网盘链接下载|

      点击此处进入下载地址 提取码:2wg3 资料简介: 本书采用独创的黑箱模式,MBA案例教学机制,结合一线实战案例,介绍Sklearn人工智能模块库和常用的机器学习算法.书中配备大量图表说明,没有枯 ...

  5. switch的一些思考(seitch与ifelse的区别)

    参考博客: https://www.cnblogs.com/balingybj/p/5751707.html  Switch的思考 Switch与If--else的比较 switch...case与i ...

  6. windows:shellcode 远程线程hook/注入(二)

    https://www.cnblogs.com/theseventhson/p/13218651.html   上次分享了基本的远程注入方法,遗留了一个问题:shellcode执行完后怎么回到线程su ...

  7. electron开发 - 打印流程(仅支持6.0.0版本以上)

    Electron打印 标签打印 标签打印一般有两种方式: 驱动打印,与普通打印机一样通过驱动方式打印. 通过指令打印,不同厂家的的打印机指令集不一样,可查看厂家提供的手册. electron 打印方式 ...

  8. 转)JVM Internals

    http://blog.jamesdbloom.com/JVMInternals.html (基于 Java 7)

  9. python 操作元组 列表===python中三大宝刀(字典已经再上一遍 说过)

    字典俗称,世界有多大就能装多大 列表俗称,你们决定 元组俗称,可远观而不可亵玩焉 列表的相关操作a=['1','2','3','5','6','7']# print(a[0])# print(a[0: ...

  10. ios 常用的正则表达式(手机号邮箱md5加密验证空字符串等)

    可以写一个nssring的category 给nsstring 增加一些方法,而这些方法就是一些正则表达式. 比如写一个叫做Helper的类  创建完了就是 NSString+Helper 然后在进行 ...