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

相关推荐
杨浦老苏4 小时前
自托管网页EPUB阅读器Codexa
docker·群晖·电子书·calibre·opds
杨浦老苏4 小时前
开源文件协作平台OpenCloud
docker·文件管理·群晖·协作
weixin_377634847 小时前
【MinerU】 Docker Compose 使用
docker·容器·mineru
庚昀◟8 小时前
腾讯云 CVM + Docker + Jenkins + GitLab CI/CD 全流程指南(python、flask实现简单计算器)
python·ci/cd·docker·flask·jenkins
PH = 78 小时前
K8S集群的搭建
云原生·容器·kubernetes
ErizJ8 小时前
Kubernetes|学习笔记
笔记·学习·kubernetes
SNOWPIAOP9 小时前
DOCKER的一些有用命令
docker
叶 落9 小时前
Ubuntu 通过 Docker 安装 Mysql8
linux·ubuntu·docker
赵文宇(温玉)9 小时前
Docker Compose 安装 Etcd
docker·容器·etcd
likeGhee9 小时前
docker创建nginx+keepalived+nacos集群(仅测试环境)
nginx·docker