GitLab的IP地址发生变更导致Runner掉线
当GitLab的IP地址发生变更导致Runner掉线时,需同步更新GitLab配置并重启服务。以下是具体解决方案: 1、修改配置文件进入目录 /opt/gitlab/embedded/service/gitlab-rails/config,编辑gitlab.yml文件,将host字段的值更新为新的IP地址。 2、编辑/etc/gitlab/gitlab.rb文件,在配置中添加或修改以下行: external_url “https://新IP地址:端口号”例如: 3、重启服务执行以下命令使配置生效: 12sudo gitlab-ctl reconfiguresudo gitlab-ctl restart
GitLab Yaml
cat > /etc/apt/sources.list << EOFdeb https://mirrors.ustc.edu.cn/ubuntu/ jammy main restricted universe multiversedeb https://mirrors.ustc.edu.cn/ubuntu/ jammy-security main restricted universe multiversedeb https://mirrors.ustc.edu.cn/ubuntu/ jammy-updates main restricted universe multiversedeb https://mirrors.ustc.edu.cn/ubuntu/ jammy-backports main restricted universe multiverseEOFcurl https://sh.rustup.rs -sSf | sh -s – -y –default-toolchain 1.75wget...
Ubuntu上安装Docker
在Ubuntu上安装Docker。 更新包索引首先,确保你的包列表是最新的。打开终端并输入以下命令: 1sudo apt-get update 安装依赖包安装Docker之前,需要先安装一些依赖包: 1sudo apt-get install apt-transport-https ca-certificates curl software-properties-common 添加Docker的官方GPG密钥为了确保下载的包是安全的,你需要添加Docker的官方GPG密钥: 1curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - 或者使用以下命令: 12sudo mkdir -p /etc/apt/keyringscurl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o...
阿里云镜像仓库
123docker login --username=615973808@qq.com registry.cn-hangzhou.aliyuncs.comdocker tag IDXX registry.cn-hangzhou.aliyuncs.com/lyfch/oslock:python3.10.14docker push registry.cn-hangzhou.aliyuncs.com/lyfch/oslock:python3.10.14
摄影
感光度又称为ISO,是指相机对光线的敏感程度。ISO值越大,感光度越高,拍出来的照片就会越亮,反之就会越暗。但是ISO过高会使照片噪点也随之变高。
django Dockerfile
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051# 使用debian Linux作为基础镜像#FROM python:3.10.14-bullseyeFROM registry.cn-hangzhou.aliyuncs.com/lyfch/oslock:python3.10.14# # 备份原有的sources.list文件RUN rm -f /etc/apt/sources.listRUN rm -fr /etc/apt/sources.list.d/ # 添加软件源RUN echo \"deb https://mirrors.tuna.tsinghua.edu.cn/debian/ bullseye main \" >> /etc/apt/sources.listRUN echo \"deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/...
centos安装docker
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657CentOs设置国内源1、切用户、切到原文件件su rootcd /etc/yum.repos.d/2、下载源文件wget http://mirrors.aliyun.com/repo/Centos-7.repo3、重命名mv CentOS-Base.repo CentOS-Base.repo.bakmv Centos-7.repo CentOS-Base.repo4、更新缓存yum clean allyum makecacheyum updateyum install net-toolsyum install -y yum-utilsyum provides '*/applydeltarpm' yum install deltarpm -y$ sudo yum-config-manager \\ --add-repo \\ ...
docker常用操作
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263查看docker源docker infodocker ps -adocker imagesdocker search 镜像名称docker pull 镜像名称:tagsdocker rm 容器IDdocker rmi <镜像ID># 创建一个imagedocker build -t django:1.0 . -f Dockerfile.django# Dockerfile是配置文件Djangodocker run -d --name django -p 8080:8000 --network my-network django:1.0docker run -d --name django -p 8080:8000 django:1.0docker run -it 55 bashNginxdocker build -t nginx:1.0...
ubuntu docker
1234567891011121314151617181920212223242526272829303132333435363738sudo apt update && sudo apt upgradesudo apt-get update -y && sudo apt-get -y install apt-transport-https ca-certificates curl software-properties-common# 安装GPG证书curl -fsSL https://mirrors.aliyun.com/docker-ce/linux/ubuntu/gpg | sudo apt-key add -# 写入软件源信息sudo add-apt-repository \"deb [arch=amd64] https://mirrors.aliyun.com/docker-ce/linux/ubuntu $(lsb_release -cs) stable\"sudo apt-get update -ysudo...
用cloc统计代码行
用cloc统计代码行首先,需要安装 cloc。 安装cloc: 如果你已经安装了Git for Windows,它通常包含`chocolatey。 使用 chocolatey安装: 1choco install cloc 使用cloc统计代码行数: 打开命令行(CMD或PowerShell),切换到你的项目目录。 运行命令: 1cloc .