linux 一键安装docker docker-compose

news/2024/10/22 13:30:27/
# 环境 deploy.sh  docker-19.03.9.tgz  docker-compose-linux-x86_64
tar -zxvf docker-19.03.9.tgz
mv docker-19.03.9 docker
cp docker/* /usr/bin/
touch /etc/systemd/system/docker.service
cat << EOG > /etc/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
# 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 --selinux-enabled=false
ExecReload=/bin/kill -s HUP $MAINPID
# 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
# Uncomment TasksMax if your systemd version supports it.
# Only systemd 226 and above support this version.
#TasksMax=infinity
TimeoutStartSec=0
# 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
# restart the docker process if it exits prematurely
Restart=on-failure
StartLimitBurst=3
StartLimitInterval=60s[Install]
WantedBy=multi-user.target
EOG
#给docker.service文件添加执行权限
chmod +x /etc/systemd/system/docker.service
#重新加载配置文件(每次有修改docker.service文件时都要重新加载下)
systemctl daemon-reload   
#启动docker
systemctl start docker
设置开机启动
#systemctl enable docker.service
#查看docker服务状态
mv docker-compose-linux-x86_64 /usr/local/bin/docker-compose
chmod +x /usr/local/bin/docker-compose
docker-compose -v
systemctl status docker

http://www.ppmy.cn/news/863774.html

相关文章

JVM中类加载的过程

文章目录 一、类加载是什么二、类加载过程1.加载2.验证3.准备4.解析5.初始化 三、什么时候进行类加载四、双亲委派模型1.三大类加载器2.加载过程 总 一、类加载是什么 把.class文件加载到内存中&#xff0c;得到类对象的过程。 二、类加载过程 1.加载 找到.class文件&#xff…

Python Process_Manager

import subprocessclass Process_Manager:def __init__(self, process_name, log_name):self.process_name process_nameself.log_name log_namedef check(self):# 执行命令&#xff0c;获取进程 IDpids self._get_pids()if len(pids) < 2:print(f"进程 {self.proce…

01golang学习笔记-指针

指针go 案例代码解释 案例代码 package mainimport "fmt"func main() {var num int 10var ptr *int // 定义一个指针变量ptr &num // 将num的地址赋值给ptrfmt.Println("num的值:", num)fmt.Println("num的地址:", &num)fmt.Println(…

RTX3080+cuda 11.0

使用最新的卡RTX3080&#xff0c;需要安装11.3 cudatoolkit install with the following command&#xff1a; conda install pytorch torchvision cudatoolkit11.3 -c pytorch

ubuntu安装1080ti nvidia驱动+cuda8.0+TensorFlow

主要参考官方文档 CUDA及cudnn安装参考http://blog.csdn.net/smf0504/article/details/69666996博客 系统Ubuntu 14.04 显卡为1080ti 步骤&#xff1a; 1.首先安装CUDA8.0 首先准备安装包&#xff0c;由于deb会存在各种问题&#xff0c;建议采用run模式安装 这里需要两个文…

算法刷题Day 36 无重叠区间+划分字母区间+合并区间

Day 36 贪心算法 435. 无重叠区间 差点就自己写出来了 class Solution {static bool cmp(const vector<int> &a, const vector<int> &b){if (a[0] b[0]) return a[1] < b[1];return a[0] < b[0];}public:int eraseOverlapIntervals(vector<ve…

揭秘GPT-4;Adobe Firefly AI 扩大测试规模

&#x1f989; AI新闻 &#x1f680; Adobe Firefly AI 扩大测试规模&#xff0c;支持100多种语言的输入 摘要&#xff1a;Adobe宣布扩大测试规模&#xff0c;Adobe Firefly AI现在支持100多种语言的 prompts 输入。网页测试版Firefly已经扩充了罗马尼亚语等多种语言&#xf…

算法安全自评估制度建设风险研判之算法滥用与算法漏洞

在我们的现代社会中&#xff0c;算法无处不在&#xff0c;它们以一种我们难以想象的方式影响着我们的生活。从我们的社交媒体喜好&#xff0c;到搜索引擎结果&#xff0c;再到可能的就业机会&#xff0c;无一不在算法的调控之中。然而&#xff0c;随着算法的广泛使用&#xff0…