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 小时前
Dify 自部署为什么跑不动?6 层瓶颈诊断法教你定位
docker
程序员老赵1 天前
Docker 部署 Redmine:老牌开源项目管理部署实测记录
docker·开源·团队管理
程序员老赵1 天前
服务器文件不想 SFTP 上传?Docker 跑个 File Browser,浏览器就能管理
服务器·docker·开源
lichenyang4533 天前
Docker 学习笔记(五):Docker Compose,用一个 YAML 启动前端、后端和 MongoDB
docker
lichenyang4533 天前
Docker 学习笔记(四):Dockerfile,把项目打成自己的镜像
docker·容器
lichenyang4533 天前
Docker 学习笔记(三):Docker 网络、bridge、子网和容器互通
docker·容器
lichenyang4533 天前
Docker 学习笔记(二):docker run 的参数到底在控制什么?
docker·容器
运维开发故事6 天前
基于 Arthas 的多集群在线诊断系统设计与实现
kubernetes
Patrick_Wilson8 天前
从「改个端口」到 502:Next.js on k8s 的容器端口、Service 映射与 env 覆盖
docker·kubernetes·next.js
探索云原生8 天前
K8s 1.36 这个 GA 特性,把 initContainer 拉模型的 hack 干掉了
ai·云原生·kubernetes