K8S系列文章之 [Alpine搭建docker环境]

基础环境已经具备,进行应用的安装和配置。

  1. 安装 docker 服务

    # 安装 docker
    apk add docker
    
  2. 配置 docker 服务

    # 启动 docker
    service docker start
    # 开机启动
    rc-update add docker boot
    # 查看版本
    docker version
    


  • 报错处理

    service docker restart
     * WARNING: you are stopping a boot service
    sh: error setting limit: Operation not permitted
     * docker: unable to apply RC_ULIMIT settings
     * Stopping Docker Daemon ...                                                                                      [ ok ]
    sh: error setting limit: Operation not permitted
     * docker: unable to apply RC_ULIMIT settings
     * Starting Docker Daemon ...
    
    • 解决方案

      # 解决方案 https://github.com/moby/moby/issues/43370
      # 注释原有 rc_ulimit  /etc/init.d/docker
      rc_ulimit=""
      RC_ULIMIT=""
      if [ "$1" = "start" ]; then
          if [ $BASH ]; then
              rc_ulimit="${DOCKER_ULIMIT:--c unlimited -n 1048576 -u unlimited}"
          else
              ulimit -c unlimited
              ulimit -n 1048576
              ulimit -p unlimited
          fi
      fi
      

相关推荐

  1. K8S系列文章 [Alpinedocker环境]

    2024-02-09 09:16:01       30 阅读
  2. K8S系列文章 [基于 Alpine 使用 kubeadm k8s]

    2024-02-09 09:16:01       35 阅读
  3. K8S系列文章 [Alpine基础环境配置]

    2024-02-09 09:16:01       36 阅读
  4. K8S环境

    2024-02-09 09:16:01       35 阅读
  5. K8S系列文章 docker配置远程访问

    2024-02-09 09:16:01       33 阅读

最近更新

  1. TCP协议是安全的吗?

    2024-02-09 09:16:01       18 阅读
  2. 阿里云服务器执行yum,一直下载docker-ce-stable失败

    2024-02-09 09:16:01       19 阅读
  3. 【Python教程】压缩PDF文件大小

    2024-02-09 09:16:01       19 阅读
  4. 通过文章id递归查询所有评论(xml)

    2024-02-09 09:16:01       20 阅读

热门阅读

  1. Go基础知识学习-习题题解

    2024-02-09 09:16:01       34 阅读
  2. 2023.2.6

    2023.2.6

    2024-02-09 09:16:01      37 阅读
  3. SQL世界之命令语句Ⅲ

    2024-02-09 09:16:01       32 阅读
  4. 机器学习之T与F分布

    2024-02-09 09:16:01       28 阅读