Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Centos7.6 installs docker using binary

2025-02-25 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/02 Report--

Create a Docker two-tier file storage directory

Mkdir / opt/kube/bin/-pv# lltotal 155108-rwxr-xr-x 1 root root 37598450 Sep 19 11:10 docker-rwxr-xr-x 1 root root 11748168 Sep 19 11:13 docker-compose-rwxr-xr-x 1 root root 26393752 Sep 19 11:13 docker-containerd-rwxr-xr-x 1 root root 14725592 Sep 19 11:13 docker-containerd-ctr-rwxr-xr-x 1 root root 4173632 Sep 19 11:13 docker-containerd-shim-rwxr-xr-x 1 root root 53076360 Sep 19 11: 11 dockerd-rwxr-xr-x 1 root root 764144 Sep 19 11:13 docker-init-rwxr-xr-x 1 root root 2837280 Sep 19 11:13 docker-proxy-rwxr-xr-x 1 root root 7495056 Sep 19 11:13 docker-runc

Configure the startup file

# vim / etc/systemd/system/ docker.service [unit] Description=Docker Application Container EngineDocumentation= http://docs.docker.io[Service]Environment="PATH=/opt/kube/bin:/bin:/sbin:/usr/bin:/usr/sbin"ExecStart=/opt/kube/bin/dockerd ExecStartPost=/sbin/iptables-I FORWARD-s 0.0.0.0 ACCEPTExecReload=/bin/kill 0-j ACCEPTExecReload=/bin/kill-s HUP $MAINPIDRestart=alwaysRestartSec=5LimitNOFILE=infinityLimitNPROC=infinityLimitCORE=infinityDelegate=yesKillMode= process [install] WantedBy=multi-user.target

Create a soft connection

Ln-s / bin/docker / opt/kube/bin/docker

Start Docker service and set boot up

Sudo systemctl start docker

Sudo systemctl enable docker

Add appuser usage rights

Sudo usermod-a-G docker appuser

Sudo systemctl daemon-reload

Sudo systemctl restart docker

Newgrp docker

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report