当前位置: 首页 > news >正文

哪家网站建设公司比较好/最近几天新闻大事

哪家网站建设公司比较好,最近几天新闻大事,汕头建设局网站,html做旅游网站Docker 离线安装的方法,其实官方已经给出了很明确的步骤。 官网链接 安装包下载地址 本文当前docker最新版:docker-19.03.3.tgz docker-compose:1.24.1 其主要内容如下: Install static binaries Download the static binary ar…

Docker 离线安装的方法,其实官方已经给出了很明确的步骤。
官网链接
安装包下载地址
本文当前docker最新版:docker-19.03.3.tgz
docker-compose:1.24.1

其主要内容如下:

Install static binaries

  1. Download the static binary archive. Go to https://download.docker.com/linux/static/stable/ (or change stable to nightly or test), choose your hardware platform, and download the .tgz file relating to the version of Docker Engine - Community you want to install.

  2. Extract the archive using the tar utility. The dockerd and docker binaries are extracted.

	$ tar xzvf /path/to/<FILE>.tar.gz
  1. Optional: Move the binaries to a directory on your executable path, such as /usr/bin/. If you skip this step, you must provide the path to the executable when you invoke docker or dockerd commands.
	$ sudo cp docker/* /usr/bin/
  1. Start the Docker daemon:
	$ sudo dockerd &

If you need to start the daemon with additional options, modify the above command accordingly or create and edit the file /etc/docker/daemon.json to add the custom configuration options.

  1. Verify that Docker is installed correctly by running the hello-world image.
	$ sudo docker run hello-world

This command downloads a test image and runs it in a container. When the container runs, it prints an informational message and exits.

配置docker为系统服务的具体操作如下三步

这里要注意了:按上面的方法确实可以正常安装和使用docker,按命令 sudo dockerd & 启动可以满足基本使用,但是docker 从1.11开始已经不是简单的通过Docker daemon来启动,而是集成了containerd、runC等多个组件。

按照如下步骤,我们先配置 containerd,再配置 docker.socket,然后配置 docker.service 服务:

一、配置 containerd

mkdir /etc/containerd
containerd config default > /etc/containerd/config.toml
touch /usr/lib/systemd/system/containerd.service
vi /usr/lib/systemd/system/containerd.service

containerd.service 内容如下:

[Unit]
Description=containerd container runtime
Documentation=https://containerd.io
After=network.target[Service]
ExecStartPre=/sbin/modprobe overlay
ExecStart=/usr/bin/containerd  # 这是你 containerd  文件的放置路径
Delegate=yes
KillMode=process
LimitNOFILE=1048576
# Having non-zero Limit*s causes performance problems due to accounting overhead
# in the kernel. We recommend using cgroups to do container-local accounting.
LimitNPROC=infinity
LimitCORE=infinity[Install]
WantedBy=multi-user.target

执行下面的命令启动 containerd 服务并查看服务的状态:

$ sudo systemctl daemon-reload
$ sudo systemctl enable containerd.service
$ sudo systemctl start containerd.service
$ sudo systemctl status containerd.service

二、配置 docker.socket

groupadd docker
touch /usr/lib/systemd/system/docker.socket
vi /usr/lib/systemd/system/docker.socket

docker.socket 文件内容如下:

[Unit]
Description=Docker Socket for the API
PartOf=docker.service[Socket]
ListenStream=/var/run/docker.sock
SocketMode=0660
SocketUser=root
# 如果出现错误:chown socket at step GROUP: No such process, 可以修改下面的 SocketGroup=root 或创建 docker 用户组(命令 groupadd docker)
SocketGroup=docker[Install]
WantedBy=sockets.target

执行下面的命令启动 containerd 服务并查看服务的状态:

$ sudo systemctl daemon-reload
$ sudo systemctl enable containerd.service
$ sudo systemctl start containerd.service
$ sudo systemctl status containerd.service

服务的 unmask 解禁操作(禁用是 mask,被禁用的服务手工启动服务和重启机器是都拉不起服务的)

systemctl unmask docker.service
systemctl unmask docker.socket

三、配置 docker.service 服务

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

docker.service 文件内容如下:

[Unit]
Description=Docker Application Container Engine
Documentation=https://docs.docker.com
BindsTo=containerd.service
After=network-online.target firewalld.service containerd.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 
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 /usr/lib/systemd/system/docker.service
systemctl daemon-reload
systemctl enable docker
systemctl start docker

安装 docker-compose

下载(docker-compose-Linux-x86_64):docker-compose 官网下载地址

然后操作拷贝和可执行权限并查看版本

sudo mv docker-compose-Linux-x86_64 /usr/local/bin/docker-compose 
sudo chmod +x /usr/local/bin/docker-compose
docker-compose -v

(THE END)

http://www.lbrq.cn/news/1460881.html

相关文章:

  • 温州哪里有网站建设/楼市最新消息
  • wordpress 侧边栏浮动/百度小程序优化排名
  • 电子商务网站建设交印花税吗/广州营销推广
  • 网站前端用什么做/巨量千川广告投放平台
  • 求一个用css写的点击左边导航栏右边显示内容的网站/seo搜索引擎优化岗位要求
  • 贵阳做网站优化/百度关键词优化师
  • 做的网站里面显示乱码怎么解决方法/ip网站查询服务器
  • 电商网站建设包括哪些内容/百度ai助手入口
  • wordpress audio/企业seo推广
  • 做网站数据存在哪里/百度下载app下载安装
  • 关于dw做网站/贵州二级站seo整站优化排名
  • 闵行区建设和管理委员会网站/抖音seo搜索引擎优化
  • 企业集团网站建设方案/新郑网络推广外包
  • 8网站建设做网站/关键词优化排名软件
  • 如何设置网站标题/全国免费发布信息平台
  • 网站需不需要备案/优化设计七年级下册数学答案
  • 用asp.net做企业网站/适合seo优化的网站
  • 开发工具是什么意思/吉林刷关键词排名优化软件
  • 重庆华鼎达网站建设/企业宣传网站
  • 网站开发清单/神马站长平台
  • 上海网站自然排名优化价格/小程序开发系统
  • 网站制作模板免费下载/app优化建议
  • 网站关键词seo费用/制作网站需要什么
  • 西安网站建设公司排名/郑州网络推广代理
  • 注册域名之后怎么做网站/上海做推广的引流公司
  • 开个做网站公司/怎么优化标题和关键词排名
  • 网站建设套模板/2024年重大新闻摘抄
  • 湖北 网站 备案 时间/启动互联全网营销推广
  • 昆明网站建设天猫运营/企业网站seo贵不贵
  • 佛山网站建设网络公司/列举网络推广的方式
  • ubuntu24.04安装selenium、chrome、chromedriver
  • 二叉树算法之【前序遍历】
  • CommonJS和ES6 Modules区别
  • 涉水救援机器人cad【12张】三维图+设计书明说
  • 【PHP】接入百度AI开放平台人脸识别API,实现人脸对比
  • Trust Management System (TMS)