{"id":138331,"date":"2019-03-07T08:24:18","date_gmt":"2019-03-07T00:24:18","guid":{"rendered":"https:\/\/lrxjmw.cn\/?p=138331"},"modified":"2019-02-27T09:27:37","modified_gmt":"2019-02-27T01:27:37","slug":"alpine-install-zsh-docker","status":"publish","type":"post","link":"https:\/\/lrxjmw.cn\/alpine-install-zsh-docker.html","title":{"rendered":"\u628a\u73a9Alpine linux(\u56db):\u5b89\u88c5zsh\u548cdocker"},"content":{"rendered":"
\u5b89\u88c5zsh<\/strong><\/div>\n

\u5b98\u7f51\u5730\u5740\uff1ahttps:\/\/ohmyz.sh\/<\/p>\n

wiki: https:\/\/github.com\/robbyrussell\/oh-my-zsh\/wiki<\/p>\n

# alpine linux\r\n# apk add zsh curl wget git\r\n<\/pre>\n

\u53c2\u7167\u5b98\u7f51<\/p>\n

# Via curl\r\n$ sh -c \"$(curl -fsSL https:\/\/raw.github.com\/robbyrussell\/oh-my-zsh\/master\/tools\/install.sh)\"\r\n<\/pre>\n
# Via wget\r\n# sh -c \"$(wget https:\/\/raw.github.com\/robbyrussell\/oh-my-zsh\/master\/tools\/install.sh -O -)\"\r\n<\/pre>\n

\u6539\u53d8\u5f53\u524d\u7528\u6237\u7684shell<\/p>\n

# alpine linux\r\n# sed -i -e \"s\/bin\\\/ash\/bin\\\/zsh\/\" \/etc\/passwd\r\n# exit\r\n<\/pre>\n

\u91cd\u65b0\u767b\u9646shell<\/p>\n

\"\"<\/p>\n

\u5b89\u88c5docker <\/strong><\/div>\n

\"\"<\/p>\n

\u5220\u9664\u65e7\u7248\u672c\u7684docker,\u5047\u5982\u6709\u3002\r\n\u279c ~ apk del docker\r\n\u279c ~ rm -rf \/etc\/docker \/var\/lib\/docker \/var\/run\/docker\r\n<\/pre>\n

\u5982\u679c\u6ca1\u6709docker\u7684\u5b89\u88c5\u5305\uff0c\u9700\u8981\u5c06community\u5730\u5740\u6dfb\u52a0\u5230 \/etc\/apk\/repositories<\/p>\n

\u279c ~ apk add docker\r\n(1\/8) Installing libmnl (1.0.4-r0)\r\n(2\/8) Installing jansson (2.10-r0)\r\n(3\/8) Installing libnftnl-libs (1.0.8-r1)\r\n(4\/8) Installing iptables (1.6.1-r1)\r\n(5\/8) Installing libltdl (2.4.6-r4)\r\n(6\/8) Installing libseccomp (2.3.2-r1)\r\n(7\/8) Installing docker (17.12.1-r0)\r\nExecuting docker-17.12.1-r0.pre-install\r\n(8\/8) Installing docker-zsh-completion (17.12.1-r0)\r\nExecuting busybox-1.27.2-r8.trigger\r\nOK: 710 MiB in 65 packages\r\n<\/pre>\n

\u542f\u52a8\u670d\u52a1<\/p>\n

\u279c ~ rc-service docker start\r\n* \/var\/log\/docker.log: creating file\r\n* \/var\/log\/docker.log: correcting mode\r\n* \/var\/log\/docker.log: correcting owner\r\n* Starting docker ... [ ok ]\r\n<\/pre>\n

\u9a8c\u8bc1\u670d\u52a1\u662f\u5426\u542f\u52a8<\/p>\n

# docker info\r\n\u279c ~ docker version\r\nClient:\r\nVersion: 17.12.1-ce\r\nAPI version: 1.35\r\nGo version: go1.9.4\r\nGit commit: 9584b2309e\r\nBuilt: Wed Mar 7 13:17:02 2018\r\nOS\/Arch: linux\/amd64\r\n\r\nServer:\r\nEngine:\r\nVersion: 17.12.1-ce\r\nAPI version: 1.35 (minimum version 1.12)\r\nGo version: go1.9.4\r\nGit commit: v17.12.1-ce\r\nBuilt: Wed Mar 7 13:16:22 2018\r\nOS\/Arch: linux\/amd64\r\nExperimental: false\r\n<\/pre>\n
\u279c ~ rc-update add docker boot\r\n* service docker added to runlevel boot\r\n<\/pre>\n

\u670d\u52a1\u542f\u52a8\u52a0\u8f7d\u7684\u811a\u672c<\/p>\n

\u279c ~ rc-service -r docker\r\n\/etc\/init.d\/docker\r\n<\/pre>\n

\u5f00\u542f\u8fdc\u7a0bapi\u53ca\u914d\u7f6e\u56fd\u5185\u955c\u50cf<\/p>\n

\u279c ~ vim \/etc\/conf.d\/docker\r\nDOCKER_OPTS\u9ed8\u8ba4\u4e3a\u7a7a\u503c\r\n\r\n# \/etc\/conf.d\/docker: config file for \/etc\/init.d\/docker\r\n\r\n# where the docker daemon output gets piped\r\n# this contains both stdout and stderr. If you need to separate them,\r\n# see the settings below\r\n#DOCKER_LOGFILE=\"\/var\/log\/docker.log\"\r\n\r\n# where the docker daemon stdout gets piped\r\n# if this is not set, DOCKER_LOGFILE is used\r\n#DOCKER_OUTFILE=\"\/var\/log\/docker-out.log\"\r\n\r\n# where the docker daemon stderr gets piped\r\n# if this is not set, DOCKER_LOGFILE is used\r\n#DOCKER_ERRFILE=\"\/var\/log\/docker-err.log\"\r\n\r\n# where docker's pid get stored\r\n#DOCKER_PIDFILE=\"\/run\/docker.pid\"\r\n\r\n# where the docker daemon itself is run from\r\n#DOCKERD_BINARY=\"\/usr\/bin\/dockerd\"\r\n\r\n# any other random options you want to pass to docker\r\nDOCKER_OPTS=\"-H 0.0.0.0:2375 -H unix:\/\/\/var\/run\/docker.sock --registry-mirror=http:\/\/xxxx.m.daocloud.io\"\r\n\r\n# disable grsecurity features\r\n#disable_grsec=\"chroot_deny_chmod chroot_deny_mknod\"\r\n<\/pre>\n

\u91cd\u542fdocker\u670d\u52a1\uff0c\u53ef\u4ee5\u8fdc\u7a0btelnet\u4e00\u4e0bdocker\u76842375\u7aef\u53e3\u8bd5\u8bd5<\/p>\n

\u279c ~ service docker restart\r\n* WARNING: you are stopping a boot service\r\n* Stopping docker ... [ ok ]\r\n* Starting docker ... [ ok ]\r\n\u279c ~ telnet 192.168.163.200 2375\r\n\r\nHTTP\/1.1 400 Bad Request\r\nContent-Type: text\/plain; charset=utf-8\r\nConnection: close\r\n\r\n400 Bad RequestConnection closed by foreign host\r\n\u279c ~\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"

\u5b98\u7f51\u5730\u5740\uff1ahttps:\/\/ohmyz.sh\/ wiki: https:\/\/github.com\/robbyru […]<\/p>\n","protected":false},"author":362,"featured_media":138048,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[55],"tags":[],"class_list":["post-138331","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-thread"],"acf":[],"_links":{"self":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/138331","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/users\/362"}],"replies":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/comments?post=138331"}],"version-history":[{"count":8,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/138331\/revisions"}],"predecessor-version":[{"id":138470,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/138331\/revisions\/138470"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media\/138048"}],"wp:attachment":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media?parent=138331"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/categories?post=138331"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/tags?post=138331"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}