前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >Linux下使用二进制文件的方式安装docker

Linux下使用二进制文件的方式安装docker

原创
作者头像
用户9042463
修改2021-09-30 10:19:05
2.3K0
修改2021-09-30 10:19:05
举报
Linux下使用二进制文件的方式安装docker
Linux下使用二进制文件的方式安装docker

1,下载二进制文件

https://download.docker.com/linux/static/stable/x86_64/docker-18.03.1-ce.tgz

2,解压二进制文件

tar xzvf docker-18.03.1-ce.tgz

3,复制二进制文件到/usr/bin目录下

cp docker/* /usr/bin/

4,检查是否安装

docker version
Client:
Version:      18.03.1-ce
API version:  1.37
Go version:   go1.9.2
Git commit:   9ee9f40
Built:        Thu Apr 26 07:12:25 2018
OS/Arch:      linux/amd64
Experimental: false
Orchestrator: swarm

Server:
Engine:
Version:      18.03.1-ce
API version:  1.37 (minimum version 1.12)
Go version:   go1.9.5
Git commit:   9ee9f40
Built:        Thu Apr 26 07:23:03 2018
OS/Arch:      linux/amd64
Experimental: false

5,配置 docker.service文件

vi /usr/lib/systemd/system/docker.service

[Unit]
Description=Docker Application Container Engine
Documentation=https://docs.docker.com
After=network-online.target firewalld.service
Wants=network-online.target

[Service]
Type=notify
ExecStart=/usr/bin/dockerd
ExecReload=/bin/kill -s HUP $MAINPID
LimitNOFILE=infinity
LimitNPROC=infinity
TimeoutStartSec=0
Delegate=yes
KillMode=process
Restart=on-failure
StartLimitBurst=3
StartLimitInterval=60s

[Install]
WantedBy=multi-user.target

6,启动dockerd服务进程

systemctl daemon-reload
systemctl start docker.service

7,检验

# ps aux|grep docker
root 2262 0.1 4.4 472948 44944 ? Ssl 16:38 0:00 /usr/bin/dockerd
root 2266 0.2 1.3 277032 13540 ? Ssl 16:38 0:01 docker-containerd --config /var/run/docker/containerd/containerd.toml
root 2895 0.0 0.0 112660 972 pts/0 S+ 16:48 0:00 grep --color=auto docker
# docker run hello-world

Hello from Docker!
This message shows that your installation appears to be working correctly.

To generate this message, Docker took the following steps:
1. The Docker client contacted the Docker daemon.
2. The Docker daemon pulled the "hello-world" image from the Docker Hub.
(amd64)
3. The Docker daemon created a new container from that image which runs the
executable that produces the output you are currently reading.
4. The Docker daemon streamed that output to the Docker client, which sent it
to your terminal.

To try something more ambitious, you can run an Ubuntu container with:
$ docker run -it ubuntu bash

Share images, automate workflows, and more with a free Docker ID:
https://hub.docker.com/

For more examples and ideas, visit:
https://docs.docker.com/engine/userguide/

原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。

如有侵权,请联系 cloudcommunity@tencent.com 删除。

原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。

如有侵权,请联系 cloudcommunity@tencent.com 删除。

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
目录
  • 1,下载二进制文件
  • 2,解压二进制文件
  • 3,复制二进制文件到/usr/bin目录下
  • 4,检查是否安装
  • 5,配置 docker.service文件
  • 6,启动dockerd服务进程
  • 7,检验
相关产品与服务
容器镜像服务
容器镜像服务(Tencent Container Registry,TCR)为您提供安全独享、高性能的容器镜像托管分发服务。您可同时在全球多个地域创建独享实例,以实现容器镜像的就近拉取,降低拉取时间,节约带宽成本。TCR 提供细颗粒度的权限管理及访问控制,保障您的数据安全。
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档