Suse12离线安装docker
先去官网下载压缩包 https://download.docker.com/linux/static/stable/x86_64/,也可以用zypper进行安装
配置:
iZbp145axkc98giot5b448Z:/ # cat /etc/issue Welcome to SUSE Linux Enterprise Server 12 SP4 (x86_64) - Kernel \r (\l). iZbp145axkc98giot5b448Z:/ # uname -r 4.12.14-95.45-default iZbp145axkc98giot5b448Z:/ #
1.先解压
tar -xzvf docker-17.03.2-ce.tgz
2.移到/usr/bin/下面
cp docker/* /usr/bin/
3.加入系统文件
#systemd config cat >/etc/systemd/system/docker.service <<-EOF [Unit] Description=Docker Application Container Engine Documentation=https://docs.docker.com 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 tcp://0.0.0.0:2375 -H unix://var/run/docker.sock ExecReload=/bin/kill -s HUP $MAINPID # 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 # Uncomment TasksMax if your systemd version supports it. # Only systemd 226 and above support this version. #TasksMax=infinity TimeoutStartSec=0 # 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 # restart the docker process if it exits prematurely Restart=on-failure StartLimitBurst=3 StartLimitInterval=60s [Install] WantedBy=multi-user.target EOF
注意:Centos的配置文件在/usr/lib/systemd/system/docker.service
4.启动
iZbp145axkc98giot5b448Z:~ # systemctl daemon-reload && systemctl start docker && systemctl enable docker.service Created symlink from /etc/systemd/system/multi-user.target.wants/docker.service to /etc/systemd/system/docker.service.
iZbp145axkc98giot5b448Z:~ # systemctl status docker && docker -v ● docker.service - Docker Application Container Engine Loaded: loaded (/etc/systemd/system/docker.service; enabled; vendor preset: disabled) Active: active (running) since Mon 2020-04-13 09:15:43 CST; 1min 35s ago Docs: https://docs.docker.com Main PID: 10499 (dockerd) Tasks: 16 (limit: 512) Memory: 22.0M CPU: 277ms CGroup: /system.slice/docker.service ├─10499 /usr/bin/dockerd -H tcp://0.0.0.0:2375 -H unix://var/run/docker.sock └─10502 docker-containerd -l unix:///var/run/docker/libcontainerd/docker-containerd.sock --metrics-interval=0 --start-timeout 2m --state-... Apr 13 09:15:43 iZbp145axkc98giot5b448Z dockerd[10499]: time="2020-04-13T09:15:43.063069978+08:00" level=warning msg="Your kernel does not su... limit" Apr 13 09:15:43 iZbp145axkc98giot5b448Z dockerd[10499]: time="2020-04-13T09:15:43.063639595+08:00" level=info msg="Loading containers: start." Apr 13 09:15:43 iZbp145axkc98giot5b448Z dockerd[10499]: time="2020-04-13T09:15:43.119810128+08:00" level=info msg="Firewalld running: false" Apr 13 09:15:43 iZbp145axkc98giot5b448Z dockerd[10499]: time="2020-04-13T09:15:43.203057615+08:00" level=info msg="Default bridge (docker0) i...ddress" Apr 13 09:15:43 iZbp145axkc98giot5b448Z dockerd[10499]: time="2020-04-13T09:15:43.254135781+08:00" level=info msg="Loading containers: done." Apr 13 09:15:43 iZbp145axkc98giot5b448Z dockerd[10499]: time="2020-04-13T09:15:43.274700296+08:00" level=info msg="Daemon has completed initialization" Apr 13 09:15:43 iZbp145axkc98giot5b448Z dockerd[10499]: time="2020-04-13T09:15:43.275131989+08:00" level=info msg="Docker daemon" commit=f5ec...03.2-ce Apr 13 09:15:43 iZbp145axkc98giot5b448Z systemd[1]: Started Docker Application Container Engine. Apr 13 09:15:43 iZbp145axkc98giot5b448Z dockerd[10499]: time="2020-04-13T09:15:43.283865177+08:00" level=info msg="API listen on var/run/docker.sock" Apr 13 09:15:43 iZbp145axkc98giot5b448Z dockerd[10499]: time="2020-04-13T09:15:43.284149113+08:00" level=info msg="API listen on [::]:2375" Hint: Some lines were ellipsized, use -l to show in full. Docker version 17.03.2-ce, build f5ec1e2 iZbp145axkc98giot5b448Z:~ # docker search redis NAME DESCRIPTION STARS OFFICIAL AUTOMATED redis Redis is an open source key-value store th... 8018 [OK] bitnami/redis Bitnami Redis Docker Image 141 [OK] sameersbn/redis 79 [OK] grokzen/redis-cluster Redis cluster 3.0, 3.2, 4.0 & 5.0 65 rediscommander/redis-commander Alpine image for redis-commander - Redis m... 36 [OK] kubeguide/redis-master redis-master with "Hello World!" 31 redislabs/redis Clustered in-memory database engine compat... 24 oliver006/redis_exporter Prometheus Exporter for Redis Metrics. Su... 21 redislabs/redisearch Redis With the RedisSearch module pre-load... 21 arm32v7/redis Redis is an open source key-value store th... 21 bitnami/redis-sentinel Bitnami Docker Image for Redis Sentinel 12 [OK] webhippie/redis Docker images for Redis 11 [OK] redislabs/redisgraph A graph database module for Redis 10 [OK] arm64v8/redis Redis is an open source key-value store th... 9 insready/redis-stat Docker image for the real-time Redis monit... 9 [OK] s7anley/redis-sentinel-docker Redis Sentinel 9 [OK] redislabs/redismod An automated build of redismod - latest Re... 7 [OK] redislabs/redisinsight RedisInsight - The GUI for Redis 5 centos/redis-32-centos7 Redis in-memory data structure store, used... 5 circleci/redis CircleCI images for Redis 4 [OK] clearlinux/redis Redis key-value data structure server with... 2 tiredofit/redis Redis Server w/ Zabbix monitoring and S6 O... 1 [OK] wodby/redis Redis container image with orchestration 1 [OK] runnable/redis-stunnel stunnel to redis provided by linking conta... 1 [OK] xetamus/redis-resource forked redis-resource 0 [OK]