summaryrefslogtreecommitdiff
path: root/install_docker
diff options
context:
space:
mode:
Diffstat (limited to 'install_docker')
-rw-r--r--install_docker/daemon.json10
-rw-r--r--install_docker/docker-18.09.8.tgzbin0 -> 48074820 bytes
-rw-r--r--install_docker/docker-compose/docker-composebin0 -> 11737728 bytes
-rw-r--r--install_docker/docker.service46
-rw-r--r--install_docker/jq-linux64bin0 -> 3027945 bytes
-rwxr-xr-xinstall_docker/setup_docker.sh22
-rw-r--r--install_docker/xz_docker.sh7
7 files changed, 85 insertions, 0 deletions
diff --git a/install_docker/daemon.json b/install_docker/daemon.json
new file mode 100644
index 0000000..49753b2
--- /dev/null
+++ b/install_docker/daemon.json
@@ -0,0 +1,10 @@
+{
+ "insecure-registries": [
+ "10.16.43.130:5080",
+ "192.168.40.153:9080"
+ ],
+ "registry-mirrors":[
+ "https://d8b3zdiw.mirror.aliyuncs.com"
+ ],
+ "data-root": "/data/docker"
+} \ No newline at end of file
diff --git a/install_docker/docker-18.09.8.tgz b/install_docker/docker-18.09.8.tgz
new file mode 100644
index 0000000..26de81a
--- /dev/null
+++ b/install_docker/docker-18.09.8.tgz
Binary files differ
diff --git a/install_docker/docker-compose/docker-compose b/install_docker/docker-compose/docker-compose
new file mode 100644
index 0000000..0060bd0
--- /dev/null
+++ b/install_docker/docker-compose/docker-compose
Binary files differ
diff --git a/install_docker/docker.service b/install_docker/docker.service
new file mode 100644
index 0000000..6e4af37
--- /dev/null
+++ b/install_docker/docker.service
@@ -0,0 +1,46 @@
+[Unit]
+Description=Docker Application Container Engine
+Documentation=https://docs.docker.com
+#BindsTo=containerd.service. — 无需containerd。
+After=network-online.target firewalld.service
+Wants=network-online.target
+
+[Service]
+Type=notify
+# the default is not to use systemd for cgroups because the delegate issues still
+# exists and systemd currently does not support the cgroup feature set required
+# for containers run by docker
+ExecStart=/usr/bin/dockerd -H unix://
+ExecReload=/bin/kill -s HUP $MAINPID
+TimeoutSec=0
+RestartSec=2
+Restart=always
+
+# Note that StartLimit* options were moved from "Service" to "Unit" in systemd 229.
+# Both the old, and new location are accepted by systemd 229 and up, so using the old location
+# to make them work for either version of systemd.
+StartLimitBurst=3
+
+# Note that StartLimitInterval was renamed to StartLimitIntervalSec in systemd 230.
+# Both the old, and new name are accepted by systemd 230 and up, so using the old name to make
+# this option work for either version of systemd.
+StartLimitInterval=60s
+
+# Having non-zero Limit*s causes performance problems due to accounting overhead
+# in the kernel. We recommend using cgroups to do container-local accounting.
+LimitNOFILE=infinity
+LimitNPROC=infinity
+LimitCORE=infinity
+
+# Comment TasksMax if your systemd version does not supports it.
+# Only systemd 226 and above support this option.
+TasksMax=infinity
+
+# set delegate yes so that systemd does not reset the cgroups of docker containers
+Delegate=yes
+
+# kill only the docker process, not all processes in the cgroup
+KillMode=process
+
+[Install]
+WantedBy=multi-user.target \ No newline at end of file
diff --git a/install_docker/jq-linux64 b/install_docker/jq-linux64
new file mode 100644
index 0000000..939227e
--- /dev/null
+++ b/install_docker/jq-linux64
Binary files differ
diff --git a/install_docker/setup_docker.sh b/install_docker/setup_docker.sh
new file mode 100755
index 0000000..260e9b6
--- /dev/null
+++ b/install_docker/setup_docker.sh
@@ -0,0 +1,22 @@
+#!/bin/bash
+#安装docker并设置为开机自启动
+tar zxvf `pwd`/docker-18.09.8.tgz &&
+cp `pwd`/docker/* /usr/bin/ &&
+mkdir /etc/docker &&
+cp `pwd`/daemon.json /etc/docker/daemon.json &&
+cp `pwd`/docker.service /usr/lib/systemd/system/docker.service &&
+#(默认执行)安装docker-compose工具
+cp `pwd`/docker-compose/docker-compose /usr/local/bin/ &&
+chmod +x /usr/local/bin/docker-compose &&
+systemctl daemon-reload &&
+systemctl start docker &&
+systemctl enable docker
+
+#如果报错 container init caused \"write /proc/self/attr/keycreate: permission denied\"": unknown.
+#设置selinux 执行 setenforce 0
+#或者永久关闭 执行 vi /etc/selinux/config 把其中的SELINUX=enforce改成disabled就可以了
+
+
+#安装jq命令
+cp `pwd`/jq-linux64 /usr/bin/jq
+
diff --git a/install_docker/xz_docker.sh b/install_docker/xz_docker.sh
new file mode 100644
index 0000000..a31f962
--- /dev/null
+++ b/install_docker/xz_docker.sh
@@ -0,0 +1,7 @@
+#!/bin/bash
+systemctl stop docker &&
+systemctl disable docker &&
+#执行不成功就把下面的注释
+#yum remove docker-ce &&
+rm -rf /var/lib/docker &&
+rm -rf $(whereis docker) \ No newline at end of file