用docker快速安装电子白板Excalidraw绘制流程图

时间:2024-12-18 06:57:24

注:本文操作以debian12.8 最小化安装环境为host系统。

一、彻底卸载原有的残留

apt-get purge docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin docker-ce-rootless-extras

二、设置docker的安装源

# Add Docker's official GPG key: 

apt update 
apt install ca-certificates curl 
install -m 0755 -d /etc/apt/keyrings 
curl -fsSL https://download.docker.com/linux/debian/gpg -o /etc/apt/keyrings/docker.asc chmod a+r /etc/apt/keyrings/docker.asc 

# Add the repository to Apt sources: 

echo \ 
"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/debian \ 
$(. /etc/os-release && echo "$VERSION_CODENAME") stable" | \ 
tee /etc/apt/sources.list.d/docker.list > /dev/null 

apt update

三、安装docker 及 docker-compose

apt install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin

四、添加国内镜像源

编写一个脚本,将registry-mirrors 中的内容替换为搜到的可用源

#!/bin/sh
cat <<-EOF > /etc/docker/daemon.json 
{
  "registry-mirrors": [
  	"https://docker.linkedbus.com",
  	"https://docker.xuanyuan.me"
  	]
}
EOF
systemctl daemon-reload
systemctl restart docker

五、安装 excalidraw

docker run -i -t -d --name exdraw -p 8090:80 excalidraw/excalidraw:latest 

## 设置 exdraw 这个容器随系统自动启动

docker container update --restart=always exdraw

六、打开