软件源更新

sudo cp /etc/apt/sources.list.d/ubuntu.sources  /etc/apt/sources.list.d/ubuntu.sources.bak
Types: deb
URIs: http://mirrors.aliyun.com/ubuntu/
Suites: noble noble-updates noble-security
Components: main restricted universe multiverse
Signed-By: /usr/share/keyrings/ubuntu-archive-keyring.gpg
Types: deb
URIs: http://mirrors.tuna.tsinghua.edu.cn/ubuntu/
Suites: noble noble-updates noble-security
Components: main restricted universe multiverse
Signed-By: /usr/share/keyrings/ubuntu-archive-keyring.gpg
sudo apt-get update



sudo wget -e "https_proxy=http://10.10.10.121:8098" https://github.com/docker/compose/releases/download/v2.29.1/docker-compose-linux-x86_64

PIP源

https://mirrors.aliyun.com/pypi/simple
https://pypi.tuna.tsinghua.edu.cn/simple
sudo docker run --detach \
--hostname gitlab \
--env GITLAB_OMNIBUS_CONFIG="external_url 'http://alegz.gitlab.com'" \
--publish 443:443 --publish 80:80 --publish 22:22 \
--name gitlab \
--restart always \
--volume $GITLAB_HOME/config:/etc/gitlab \
--volume $GITLAB_HOME/logs:/var/log/gitlab \
--volume $GITLAB_HOME/data:/var/opt/gitlab \
--shm-size 256m \
10.10.10.56:80/library/gitlab/gitlab-ce:1.0.0



version: '3.6'
services:
gitlab:
image: 10.10.10.56:80/library/gitlab/gitlab-ce:1.0.0
container_name: gitlab
restart: always
hostname: 'alegz.gitlab.com'
environment:
GITLAB_OMNIBUS_CONFIG: |
external_url 'http://alegz.gitlab.com'
gitlab_rails['gitlab_shell_ssh_port'] = 2424
ports:
- '80:80'
- '443:443'
- '2424:22'
volumes:
- '$GITLAB_HOME/config:/etc/gitlab'
- '$GITLAB_HOME/logs:/var/log/gitlab'
- '$GITLAB_HOME/data:/var/opt/gitlab'
shm_size: '256m'

docker

sudo vim /etc/systemd/system/multi-user.target.wants/docker.service

[Service]
Environment=HTTP_PROXY=http://127.0.0.1:7897
Environment=HTTPS_PROXY=http://127.0.0.1:7897
Environment=NO_PROXY=localhost,127.0.0.1

systemctl daemon-reload
sudo service docker restart

docker-compose

cp docker-compose /usr/local/bin
chmod +x docker-compose