- create volume
podman volume create --label type=gitlab-17.2 --label env=dev gitlab-17.2-conf
podman volume create --label type=gitlab-17.2 --label env=dev gitlab-17.2-data
podman volume create --label type=gitlab-17.2 --label env=dev gitlab-17.2-logs
- run
1、haha
podman run --detach \
--hostname 192.168.43.15 \
--env GITLAB_OMNIBUS_CONFIG="external_url 'http://192.168.43.15:8929'; gitlab_rails['gitlab_shell_ssh_port'] = 2424" \
--publish 8929:8929 --publish 2424:22 \
--name gitlab-17 \
--volume gitlab-17.2-conf:/etc/gitlab \
--volume gitlab-17.2-data:/var/log/gitlab \
--volume gitlab-17.2-logs:/var/opt/gitlab \
--shm-size 256m \
gitlab/gitlab-ce:17.2.4-ce.0
podman exec -it gitlab-17 /bin/bash
tee -a /etc/gitlab/gitlab.rb <<-'EOF'
external_url "http://192.168.43.15:8929"
gitlab_rails['gitlab_shell_ssh_port'] = 2422
EOF
gitlab-ctl reconfigure
exit
2、uuuu
podman run --detach \
--hostname 192.168.43.15 \
--publish 18000:80 --publish 10022:22 \
--name gitlab-17 \
--volume gitlab-17.2-conf:/etc/gitlab \
--volume gitlab-17.2-data:/var/log/gitlab \
--volume gitlab-17.2-logs:/var/opt/gitlab \
--env GITLAB_OMNIBUS_CONFIG="external_url 'http://192.168.43.15:18000'; gitlab_rails['gitlab_shell_ssh_port'] = 10022" \
gitlab/gitlab-ce:17.2.4-ce.0
podman exec -it gitlab-17 /bin/bash
tee -a /etc/gitlab/gitlab.rb <<-'EOF'
external_url "http://192.168.43.15:18000"
gitlab_rails['gitlab_shell_ssh_port'] = 10022
EOF
gitlab-ctl reconfigure
exit
podman exec -it gitlab-17 grep 'Password:' /etc/gitlab/initial_root_password
参数文献