Docker(docker-compose)安装harbor

官方文档入口 配置harbor.yml 1 2 3 4 5 wget https://github.com/goharbor/harbor/releases/download/v2.5.0/harbor-offline-installer-v2.5.0.tgz tar zxf harbor-offline-installer-v2.5.0.tgz && cd harbor cp harbor.yml.tmpl harbor.yml harbor.yml参考 1 2 3 4 5 6 7 8 9 10 hostname: harbor.example.com http: port: 8080 external_url: https://harbor.example.com harbor_admin_password: Harbor12345 database: password: root123 max_idle_conns: 100

Docker安装gitlab

官方文档入口 运行gitlab 1 2 3 4 5 6 7 8 9 10 11 sudo docker run --detach \ --hostname gitlab.example.com \ --publish 880:80 --publish 22:22 \ --name gitlab \ --restart always \ --env TZ='Asia/Shanghai' \ --volume /srv/gitlab/config:/etc/gitlab \ --volume /srv/gitlab/logs:/var/log/gitlab \ --volume /srv/gitlab/data:/var/opt/gitlab \ --shm-size 256m \ gitlab/gitlab-ce gitlab14版本

Fail2ban

1 2 3 4 5 6 7 8 9 sudo apt-get install -y fail2ban cat << EOF | sudo tee /etc/fail2ban/jail.d/sshd.local [sshd] enabled = true port = 23422 EOF sudo systemctl reload fail2ban