系统相关
首页 > 系统相关> > Windows 系统使用 docker 本地安装并运行 sentry

Windows 系统使用 docker 本地安装并运行 sentry

作者:互联网

使用 docker 本地试用 sentry

1 Windows 启用 WSL2,配置 docker

1 安装 docker desktop
2 启用 WSL2
旧版 WSL 的手动安装步骤 | Microsoft Docs
3 在 Microsoft Store 安装 Ubuntu
4 在 docker desktop 中启用 Use the WSL 2 based engine

5 在 docker desktop 中启用 Enable integration with additional distros: Ubuntu

2 启动 Ubuntu

直接使用这里的脚本配置

getsentry/self-hosted: Sentry, feature-complete and packaged up for low-volume deployments and proofs-of-concept

Self-Hosted Sentry | Sentry Developer Documentation

1 git clone 仓库

git clone https://github.com/getsentry/self-hosted.git

如果没有安装 git,先安装

sudo apt-get update
sudo apt-get install git

2 cd 到 self-hosted 目录,运行 install

sudo ./install.sh
// 如果 git 链接不稳,可以跳过 commit 检查
sudo ./install.sh --skip-commit-check

3 运行 docker

在 self-hosted 目录运行 docker compose

sudo docker compose --env-file .env.custom up -d

不出意外应该就可以了,本机直接访问 http://127.0.0.1:9000/ 即可,这里 Ubuntu 和 Windows 的端口是共用的。

3 其它可能遇到的问题与处理

1 使用 wsl -v -l 查看 wsl 运行的实例与版本

如果是版本 1 或者需要删除,使用命令
wsl --unregister <DistributionName>
wsl --unregister Ubuntu

WSL 的基本命令 | Microsoft Docs

参考文章:
docker下一步步部署sentry - mvpbang - 博客园
win10利用WSL2安装docker的2种方式 - 知乎

标签:git,Windows,sentry,hosted,--,Ubuntu,docker,sudo
来源: https://www.cnblogs.com/jasongrass/p/15831440.html