linxu docker安装

news/2025/4/1 22:29:10/文章来源:https://www.cnblogs.com/yylucky666/p/18801248

1.下载docker

https://download.docker.com/linux/static/stable/x86_64/

2 上传压缩包并解压

 tar zxvf docker-27.2.1.tgz

3 部署docker

 

在解压路径下执行:

cp docker/* /usr/bin/

4 验证安装结果

docker -v

5 注册docker服务

vim /etc/systemd/system/docker.service

[Unit]
Description=Docker Application Container Engine
Documentation=https://docs.docker.com
# BindsTo=containerd.service
# After=network-online.target firewalld.service containerd.service
After=network-online.target firewalld.service
Wants=network-online.target
# Requires=docker.socket[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 fd:// --containerd=/run/containerd/containerd.sock
ExecStart=/usr/bin/dockerd
ExecReload=/bin/kill -s HUP $MAINPID
TimeoutSec=0
RestartSec=2
Restart=always# Note that StartLimit* options were moved from "Service" to "Unit" in systemd 229.
# Both the old, and new location are accepted by systemd 229 and up, so using the old location
# to make them work for either version of systemd.
StartLimitBurst=3# Note that StartLimitInterval was renamed to StartLimitIntervalSec in systemd 230.
# Both the old, and new name are accepted by systemd 230 and up, so using the old name to make
# this option work for either version of systemd.
StartLimitInterval=60s# 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# Comment TasksMax if your systemd version does not support it.
# Only systemd 226 and above support this option.
# TasksMax=infinity# 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[Install]
WantedBy=multi-user.target

# 给启动配置添加执行权限
chmod +x /etc/systemd/system/docker.service
# 重载Unit服务配置
systemctl daemon-reload
# 添加 docker 开机自启
systemctl enable docker
# 启动 docker
systemctl start docker


 
 

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.hqwc.cn/news/908370.html

如若内容造成侵权/违法违规/事实不符,请联系编程知识网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

[Vue] Vue 模板编译原理解析 part3

生成 JavaScript AST 我们要对整个模板的 AST 进行转换,转换为 JS AST。 我们目前的代码已经有了遍历模板 AST,并且针对不同的节点,做不同操作的能力。 我们首先需要知道 JS AST 长什么样子: function render(){return null; }上面的代码,所对应的 JS AST 如下图所示:这里…

[Vue] Vue模板编译原理解析 part3

生成 JavaScript AST 我们要对整个模板的 AST 进行转换,转换为 JS AST。 我们目前的代码已经有了遍历模板 AST,并且针对不同的节点,做不同操作的能力。 我们首先需要知道 JS AST 长什么样子: function render(){return null; }上面的代码,所对应的 JS AST 如下图所示:这里…

关于window版本nacos版本安装过程

环境 window10 16G 1TB下载地址window版本zip包 https://github.com/alibaba/nacos/releases/download/2.5.1/nacos-server-2.5.1.zip Linux版tar包 https://github.com/alibaba/nacos/releases/download/2.5.1/nacos-server-2.5.1.tar.gz安装前提安装jdk 1.8及以上,我安装了…

Netty源码—10.Netty工具之时间轮

大纲 1.什么是时间轮 2.HashedWheelTimer是什么 3.HashedWheelTimer的使用 4.HashedWheelTimer的运行流程 5.HashedWheelTimer的核心字段 6.HashedWheelTimer的构造方法 7.HashedWheelTimer添加任务和执行任务 8.HashedWheelTimer的完整源码 9.HashedWheelTimer的总结 10.Hashe…

0330-好的开始是成功的一半

前言 今天帮一个 USC Game Dev 专业同学做项目,真的挺复杂的一个项目。 但是我依然把项目配置好了,后面就是慢慢的添加新功能。 我用了 git 管理这个项目,把自己的每一步关键操作都用 git commit 记录一下。效果心路历程 我想过很多次 “要不就放弃吧” 但是看到旁边的“Att…

数仓项目建设方案——维度建模

数仓项目建设方案——维度建模式信息收集项目背景 阐述公司当前的行业,涉及的主要业务,相关数据的大小、分布、更新情况描述,需要解决的相关问题。公司当前数据建设现状 使用的数据库、数据来源系统与方式、现有数据分析组织,所使用的 BI 工具与数仓工具、为什么建立以及当…

在机器人和无人机时代,测绘人的出路在哪里?

一、技术革命:当测绘行业按下“加速键”无人机与机器人技术正在重塑测绘行业的底层逻辑。传统测绘依赖人工作业,效率低、成本高且风险大,而无人机凭借其灵活性和高效性,已能快速完成大范围地形测绘,精度可达厘米级,甚至替代人工进入危险区域(如塌方、悬崖等)作业。例如…

openwrt禁止设备联网

一、代码操作 把mac地址换成要禁用的设备mac地址,加到自定义防火墙最后,记得最后重启防火墙生效 /etc/init.d/firewall restart iptables -I INPUT -m mac --mac-source B8:C7:4A:7A:66:2E -j DROP iptables -I FORWARD -m mac --mac-source B8:C7:4A:7A:66:2E -j DROP iptab…

JVM调优原理篇

JVM调优 什么是JVM调优,调优的指标是什么? JVM调优指的就是对当前系统进行性能调优,简单来说就是尽可能使用较小的内存和CPU来让JAVA程序获得更高的吞吐量及较低的延迟。 调优常见的指标:吞吐量:是指不考虑垃圾收集引起的停顿时间或内存消耗,应用达到的最高性能指标。 延…

20241216 实验二《Python程序设计》实验报告

20241216 2024-2025-2 《Python程序设计》实验二报告 课程:《Python程序设计》 班级: 2412 姓名: 曾楷 学号:20241216 实验教师:王志强 实验日期:2024年3月26日 必修/选修: 公选课 (一) 实验内容 1.设计并完成一个完整的应用程序,完成加减乘除模等运算,功能多多益善…

[Windows] TechSweeper 应用程序卸载神器V1.2.1

一.我们改进了程序元素显示,现在超出列宽,可以进行滚动显示二.我们为程序添加了右键菜单,现在功能更加全面三.现在程序出现崩溃时,可以进行错误提示与收集四.现在程序可以进行主题切换了五.添加了作者相关信息六.现在可以打开程序相关注册表了(直接显示 清晰明了)七.现在可…

鸢尾花书 - Book_3《数学要素》 - Chapter1 万物皆数

上面图片摘自原书 一、基础概念普及 1. 向量 若干数字排成一行或一列,并且用中括号括起来,得到的数组叫做向量。 2. 行向量 排成一行 3. 列向量 排成一列 4. 转置 行向量转置得到列向量,反之。 5. 矩阵 有行,有列,像表格。 6. 元素 x[i][j] 代表矩阵 X 中第 i 行第 j 列元…