登录到linux系统

1、安装必备的应用
yum install net-tools vim wget lrzsz epel-release -y

cat  /etc/selinux/config 
# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
#     enforcing - SELinux security policy is enforced.
#     permissive - SELinux prints warnings instead of enforcing.
#     disabled - No SELinux policy is loaded.
SELINUX=disabled
# SELINUXTYPE= can take one of three values:
#     targeted - Targeted processes are protected,
#     minimum - Modification of targeted policy. Only selected processes are protected. 
#     mls - Multi Level Security protection.
SELINUXTYPE=targeted 
SELINUX=disabled 改成disabled

2、添加docker源
curl https://download.docker.com/linux/centos/docker-ce.repo -o /etc/yum.repos.d/docker.repo

3、安装docker    
    yum install docker-ce -y

4、Docker镜像管理

vim /etc/docker/daemon.json   阿里云Docker镜像加速
{
    "registry-mirrors":["https://dhq9bx4f.mirror.aliyuncs.com"]
}
#重载systemctl的配置
systemctl daemon-reload
systemctl restart docker

5、加入开机启动
systemctl enable docker

6、设置docker基本参数
vim /etc/docker/daemon.json
{
    "bip": "172.xx.x.1/16", 设置IP
    "max-concurrent-downloads": 10,
    "log-driver": "json-file",
    "log-level": "warn",
    "log-opts": {
        "max-size": "20m",
        "max-file": "2"
    },
    "storage-driver": "overlay2"
}

保存退出重启dokcer
systemctl restart docker

7、Jenkins Docker安装文件

dokcer-composer.yml

dokcer-composer.yml

version: '3'

services:
  jenkins:
    container_name: jenkins
    image: jenkins/jenkins:latest
    restart: always
    ports:
      - 8080:8080
      - 5000:5000
    volumes:
      - /etc/localtime:/etc/localtime:ro
      - /opt/jenkins_home:/var/jenkins_home:rw

Logo

魔乐社区(Modelers.cn) 是一个中立、公益的人工智能社区,提供人工智能工具、模型、数据的托管、展示与应用协同服务,为人工智能开发及爱好者搭建开放的学习交流平台。社区通过理事会方式运作,由全产业链共同建设、共同运营、共同享有,推动国产AI生态繁荣发展。

更多推荐