zoukankan      html  css  js  c++  java
  • docker安装并设置开机启动(Linux)

    docker 开机启动:
    systemctl enable docker


    使用的linux系统为CentOS7.2

    docker分为CE和EE版本,EE版本收费,一般我们使用CE版本就满足要求了

    docker安装及启动

    docker安装很简单,直接使用如下命令安装即可,安装后的docker版本即为CE免费版(对于更高的linux版本,可以先执行安装docker-ce,如果提示Nothing to do,则再直接使用如下命令)

    yum -y install docker

    安装结束后,查看docker运行状态

    启动docker

    查看/var/log/messages日志,扎到如下错误信息

    Aug 12 19:29:14 localhost dockerd-current: Error starting daemon: SELinux is not supported with the overlay2 graph driver on this kernel. Either boot into a newer kernel or disable selinux in docker (--selinux-enabled=false)

    根据错误提示,修改docker配置文件,设置--selinux-enabled=false

    vim /etc/sysconfig/docker

    保存后,重新启动docker,查看启动状态

    设置docker开机启动

    docker安装之后,已经安装了开机启动service文件,但还需要在设置下开机启动,才能在服务器重启时自动启动

    systemctl enable docker

  • 相关阅读:
    Snmpwalk
    本地使用PostMan测试接口没有问题,但是线上直接进不了接口
    redis使用注意事项
    线程笔记
    springboot笔记
    springboot中多个地址指向同一个方法
    开发过程中遇到的注解
    使用maven时用到的一些问题
    遇到线程安全问题的案例
    mongodb
  • 原文地址:https://www.cnblogs.com/adolfmc/p/12115686.html
Copyright © 2011-2022 走看看