Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docker 安装 sentry.io 遇坑记录 #127

Open
JesseZhao1990 opened this issue May 9, 2018 · 1 comment
Open

docker 安装 sentry.io 遇坑记录 #127

JesseZhao1990 opened this issue May 9, 2018 · 1 comment

Comments

@JesseZhao1990
Copy link
Owner

JesseZhao1990 commented May 9, 2018

  1. 由于sentry.io要求的docker版本是,Docker 1.10.0+ 但是CenterOs7以下的系统没法装高版本的docker。所以首先要保证自己的centeros系统版本是大于7的
  2. 利用阿里的镜像代理。要不然不是慢死就是无法连上
  3. 安装过程中遇到的此问题
    No such file or directory for /var/lib/docker/overlay2 docker/for-mac#1396
  4. ERROR: Service 'web' failed to build: oci runtime error: container_linux.go:247: starting container process caused "exec: "/bin/sh": stat /bin/sh: no such file or directory"
@JesseZhao1990
Copy link
Owner Author

JesseZhao1990 commented May 10, 2018

CenterOS 7.4 安装docker步骤

1. 安装docker

yum install install docker-io

2. 安装docker-compose

curl -L https://github.com/docker/compose/releases/download/1.17.1/docker-compose-`uname -s`-`uname -m` -o /usr/local/bin/docker-compose

3. 启动docker

service docker start

4. 阿里云加速

登录阿里云,访问 https://cr.console.aliyun.com/#/accelerator 获取专属Docker加速器地址
阿里云会给出加速的地址和如何配置,下面是一个举例,注意替换下面的xxxxxx.
针对Docker客户端版本大于1.10.0的用户
您可以通过修改daemon配置文件/etc/docker/daemon.json来使用加速器:

sudo mkdir -p /etc/docker
sudo tee /etc/docker/daemon.json <<-'EOF'
{
  "registry-mirrors": ["https://xxxxxx.mirror.aliyuncs.com"]
}
EOF
sudo systemctl daemon-reload
sudo systemctl restart docker

5. clone sentry的docker部署仓库,根据官方文档一步步的往下走就可以

首先克隆一下
https://github.com/getsentry/onpremise.git

然后创建本地数据存储目录和sentry配置文件目录
mkdir -p data/{sentry,postgres}
生成私密的key,并添加到docker-compose.yml中的SENTRY_SECRET_KEY
docker-compose run --rm web config generate-secret-key
创建一个超级账户
docker-compose run --rm web upgrade
启动所有服务
docker-compose up -d
本地访问localhost:9000,即可使用
Access your instance at localhost:9000!

6.如果需要修改docker-compose.yml配置文件

如果修改docker-compose.yml 配置文件,则需要先停掉各个容器。
命令是docker-compose stop
修改完之后,再重新挂起
docker-compose up -d

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant