Alpine搭建docker环境
Alpine搭建docker环境
基础环境已经具备,进行应用的安装和配置。
-
安装 docker 服务
# 安装 docker apk add docker
-
配置 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
-
本文来自博客园,作者:虫祇,转载请注明原文链接:https://www.cnblogs.com/chongxs/p/17982225/alpine-docker-env