install-docker

Install Docker Engine from binaries

Install daemon and client binaries on Linux
Prereuistes
  • A 64-bit installation
  • Version 3.10 or higher of the Linux kernel.
  • iptables version 1.4 or higher.
  • git version 1.7 or higher
  • A ps executable.
  • XZ Utils 4.9 or higher
  • A properly mounted cgroupfs hierarchy;
    SECURE YOUR ENVIRONMENT AS MUCH AS POSSIBLE
    OS considrations
    Enable SELinux or AppArmor if possible.
Install static binaries
  1. Download the static binary archive.
    docker download
  2. Extract the archive using the tar utility.
tar xzvf /path/to/<FILE>.tar.gz
  1. Move the binaries to a directory on your executable path, such as /usr/bin/.
sudo cp docker/* usr/bin/
  1. Start the Docker daemon:
sudo dockerd &
  1. Verify that Docker is installed correctly by running the hello-word image.
sudo docker run hell-world

Post-installation steps for linux

Manage Docker as a non-root user

To create the docker group and add your user:
1. Create the docker group.
sudo groupadd docker
2. Add your user to the docker group
sudo usermod -aG docker $USER
3. Log out and lob back in so that your group membership is re-evaluated.
On linux, you can also run the following command to activate the changes to groups:
newgrp docker
4. Verify that you can run docker commands without sudo.
docker run hello-world
5. fail, you need this:
reboot
permission denied

Configure Docker to start on boot

docker离线安装并配置docker.service为服务自启动

```
ExecStart=/usr/bin/dockerd # 配置成你自己的路径
```
Config mirror registry

aliyun mirror

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值