gitlab runner Cannot connect to the Docker daemon

1
2023-08-27 01:18:20 ERROR: Job failed (system failure): Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running? (docker.go:826:0s)  duration_s=9.00823017 job=111 project=1 runner=DHcxPThVr

当使用Docker Compose启动GitLab Runner并且需要解决与Docker守护进程的连接问题时,您可以按照以下步骤进行修改:

打开您的Docker Compose文件,找到GitLab Runner服务的定义部分。

在GitLab Runner服务的定义部分中,添加一个卷映射,将宿主机上的Docker守护进程的Unix套接字文件映射到容器内。这样,GitLab Runner容器内的GitLab Runner程序就可以与宿主机上的Docker进行通信。

示例:

1
2
3
4
5
6
7
version: '3'
services:
gitlab-runner:
image: gitlab/gitlab-runner:latest
volumes:
- /var/run/docker.sock:/var/run/docker.sock
# 其他服务配置...

保存并关闭Docker Compose文件。

在包含Docker Compose文件的目录中,运行以下命令以启动GitLab Runner服务:

1
docker-compose up -d

通过这些步骤,您的GitLab Runner服务将能够与宿主机上的Docker守护进程进行通信,以执行任务。确保您理解此更改的影响,并根据需求进行适当的配置。

RabbitMQ

Exchange.Name

Exchange 名称。以 amq.开头的为保留字段,因此不能使用。例如:amq.test。

iterm2 vim scroll

iTerm2 > Preferences > Advanced

Mouse > Scroll wheel sends arrow keys in alternate screen mode.

Easy access from the search window with scroll .

Scroll wheel sends arrow keys in alternate screen mode. setting changes the scrolling behavior as follows.

Yes : Scroll in the Vim window
No : iTerm window scrolls regardless of Vim

In my case, since there are many cases I want to paste from Vim in past console logs, I set the setting to No so that the iTerm window scrolls.

docker 基础入门

docker是什么?

docker属于linux容器的一种封装,提供了简单易用的接口

linux容器不是一个完整的操作系统,而是对进程进行隔离。 它有启动快资源占用少体积小等优点

而虚拟机在与环境配置搭建上不仅资源占用多冗余步骤多启动慢

git基础命令及概念

git常用命令

git download

初始化GIT项目

1
git init

cloudflare设置代理后ssh无法连接服务器

设置代理后外网无法获取实际的服务器IP地址,提供了极好的安全措施
虽然因此无法直接利用域名连接服务器

可以利用cloudflare提供的工具,个人觉得不是很好用

暂时解决方案是本地设置/etc/hosts 设置IP指向自定义域名,仅供本地使用
这样便于本地管理与修改

/etc/hosts

1
192.168.1.10 fuckme

~/.ssh/config

1
2
Host urara.top 
HostName fuckme

免费SSL推荐

SSL For Free

三个月更新一次,限1个域名,下载证书自己配置,较为自由
https://www.sslforfree.com/

CloudFlare

最多三年更新一次,代理
https://dash.cloudflare.com/

zsh compinit: insecure directories, run compaudit for list.

fix

1
compaudit | xargs chmod g-w,o-w

git开发分支合并到主分支的正确姿势

将开发分支的commit合并

查找commit的hash code

1
git log
Your browser is out-of-date!

Update your browser to view this website correctly. Update my browser now

×