前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
社区首页 >专栏 >【Docker】:如何在 CentOS 8 中安装 Docker Engine?

【Docker】:如何在 CentOS 8 中安装 Docker Engine?

作者头像
WEBJ2EE
发布于 2022-01-04 05:48:14
发布于 2022-01-04 05:48:14
1.4K00
代码可运行
举报
文章被收录于专栏:WebJ2EEWebJ2EE
运行总次数:0
代码可运行
代码语言:javascript
代码运行次数:0
运行
AI代码解释
复制
目录
1. 系统要求 
2. 配置仓库 
3. 安装 Docker Engine 
4. 启动 Docker 
5. 验证 
6. 小科普 
  6.1. libseccomp 是什么?
  6.2.  seccomp是什么?
  6.3. BPF 又是什么?

1. 系统要求

  • CentOS 7 或 8

2. 配置仓库

  • 安装 yum-utils
代码语言:javascript
代码运行次数:0
运行
AI代码解释
复制
sudo yum install -y yum-utils
  • 配置仓库
代码语言:javascript
代码运行次数:0
运行
AI代码解释
复制
sudo yum-config-manager \
    --add-repo \
    https://download.docker.com/linux/centos/docker-ce.repo

3. 安装 Docker Engine

代码语言:javascript
代码运行次数:0
运行
AI代码解释
复制
yum install  docker-ce docker-ce-cli containerd.io --allowerasing
代码语言:javascript
代码运行次数:0
运行
AI代码解释
复制
yum install  docker-ce docker-ce-cli containerd.io --allowerasing

4. 启动 Docker

代码语言:javascript
代码运行次数:0
运行
AI代码解释
复制
sudo systemctl start docker

5. 验证

代码语言:javascript
代码运行次数:0
运行
AI代码解释
复制
docker run hello-world
代码语言:javascript
代码运行次数:0
运行
AI代码解释
复制
yum install libseccomp-devel
代码语言:javascript
代码运行次数:0
运行
AI代码解释
复制
docker run hello-world

6. 小拓展(表示翻译不了...)

6.1. libseccomp 是什么?

The libseccomp library provides an easy to use, platform independent, interface to the Linux Kernel's syscall filtering mechanism. The libseccomp API is designed to abstract away the underlying BPF based syscall filter language and present a more conventional function-call based filtering interface that should be familiar to, and easily adopted by, application developers.

6.2. seccomp是什么?

A large number of system calls are exposed to every userland process with many of them going unused for the entire lifetime of the process. As system calls change and mature, bugs are found and eradicated. A certain subset of userland applications benefit by having a reduced set of available system calls. The resulting set reduces the total kernel surface exposed to the application. System call filtering is meant for use with those applications.

Seccomp filtering(SECure COMPuting with filters) provides a means for a process to specify a filter for incoming system calls. The filter is expressed as a Berkeley Packet Filter (BPF) program, as with socket filters, except that the data operated on is related to the system call being made: system call number and the system call arguments. This allows for expressive filtering of system calls using a filter program language with a long history of being exposed to userland and a straightforward data set.

6.3. BPF 又是什么?

The Berkeley Packet Filter (BPF) is a technology used in certain computer operating systems for programs that need to, among other things, analyze network traffic (and eBPF is an extended BPF JIT virtual machine in the Linux kernel). It provides a raw interface to data link layers, permitting raw link-layer packets to be sent and received.

BPF supports filtering packets, allowing a userspace process to supply a filter program that specifies which packets it wants to receive. For example, a tcpdump process may want to receive only packets that initiate a TCP connection. BPF returns only packets that pass the filter that the process supplies. This avoids copying unwanted packets from the operating system kernel to the process, greatly improving performance.

参考:

Install Docker Engine: https://docs.docker.com/engine/install/ libseccomp: https://github.com/seccomp/libseccomp

本文参与 腾讯云自媒体同步曝光计划,分享自微信公众号。
原始发表:2021-12-28,如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 WebJ2EE 微信公众号,前往查看

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

本文参与 腾讯云自媒体同步曝光计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档
查看详情【社区公告】 技术创作特训营有奖征文