网站开发需要逻辑吗,wordpress怎么关闭网站,嵌入式软件开发薪资,59zwd一起做网站前期准备
查看操作系统版本#xff0c;跟本文标题核对一下
uname -a查看操作系统架构
uname -m下载离线包
下载 docker 离线包
地址#xff1a;https://download.docker.com/linux/static/stable/ 选择系统架构对应的文件目录#xff1a;aarch64#xff0c;我目前使用…前期准备
查看操作系统版本跟本文标题核对一下
uname -a查看操作系统架构
uname -m下载离线包
下载 docker 离线包
地址https://download.docker.com/linux/static/stable/ 选择系统架构对应的文件目录aarch64我目前使用的版本是24.0.6
下载 docker-compose 离线包
地址https://github.com/docker/compose/releases 选择系统架构对应的文件目录aarch64我目前使用的版本是2.30.1
修改 docker 存储路径
修改存储目录至数据盘避免后期埋坑系统盘炸裂
mkdir /etc/dockervim /etc/docker/daemon.json{data-root: /data/docker/root_dir/
}准备 docker.service 系统配置文件
其中 --default-ulimit nofile65535:65535这个对 java 程序能在容器中愉快的运行十分重要
docker.service[Unit]
DescriptionDocker Application Container Engine
Documentationhttps://docs.docker.com
Afternetwork-online.target firewalld.service
Wantsnetwork-online.target[Service]
Typenotify
# 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 --default-ulimit nofile65535:65535
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.
LimitNOFILEinfinity
LimitNPROCinfinity
LimitCOREinfinity
# Uncomment TasksMax if your systemd version supports it.
# Only systemd 226 and above support this version.
#TasksMaxinfinity
TimeoutStartSec0
# set delegate yes so that systemd does not reset the cgroups of docker containers
Delegateyes
# kill only the docker process, not all processes in the cgroup
KillModeprocess
# restart the docker process if it exits prematurely
Restarton-failure
StartLimitBurst3
StartLimitInterval60s[Install]
WantedBymulti-user.target一把梭
# 进入安装文件存放目录
cd /data/soft# 解压 docker 到当前目录
tar -xvf docker-24.0.6.tgz# 将 docker 文件移动到 /usr/bin 目录下
cp -p docker/* /usr/bin# 将 docker-compose 文件复制到 /usr/local/bin/ 目录下并重命名为 docker-compose
cp docker-compose-linux-aarch64 /usr/local/bin/docker-compose# 设置 docker-compose 文件权限
chmod x /usr/local/bin/docker-compose# 将 docker.service 移到 /etc/systemd/system/ 目录
cp docker.service /etc/systemd/system/# 设置 docker.service 文件权限
chmod x /etc/systemd/system/docker.service# 重新加载配置文件
systemctl daemon-reload# 启动docker
systemctl start docker# 设置 docker 开机自启
systemctl enable docker.service验证
查看 docker 版本
docker -v查看 docker-compose 版本
docker-compose -v