手机网站开发利用流程,动漫制作技术专业介绍,网站建设经费预算包括哪些,唐山网站设计公司下载镜像
直接下载最新版#xff0c;比较大有2.36G
docker pull gitlab/gitlab-ce创建数据存放的目录位置
按自己习惯位置创建目录
mkdir -p /usr/local/docker/docker_gitlab编写docker-compose.yml
在上面创建的挂载目录里面#xff08;/usr/local/docker/docker_gitl…下载镜像
直接下载最新版比较大有2.36G
docker pull gitlab/gitlab-ce创建数据存放的目录位置
按自己习惯位置创建目录
mkdir -p /usr/local/docker/docker_gitlab编写docker-compose.yml
在上面创建的挂载目录里面/usr/local/docker/docker_gitlab新建docker-compose.yml文件。
HTTP端口改成8888根据自己习惯
SSH端口改成2222根据自己习惯
version: 3.1
services:gitlab:image: gitlab/gitlab-ce:latestcontainer_name: gitlabrestart: alwaysenvironment:GITLAB_OMNIBUS_CONFIG: |external_url http://192.168.170.111:8888gitlab_rails[gitlab_shell_ssh_port] 2222ports:- 8888:8888- 2222:2222volumes:- ./config:/etc/gitlab- ./logs:/var/log/gitlab- ./data:/var/opt/gitlab后台运行容器组
docker-compose up -d登录Gitlab
访问你部署的服务器IP你设置的端口192.168.170.111:8888
如果访问显示502就是还没启动好Gitlab比较吃配置启动较慢可以通过查看日志命令观察是否启动好
docker logs -f gitlab启动好后首次登录需要查看Gitlab初始密码默认账户root
不用进容器查看密码配置目录挂载到了本地的/usr/local/docker/docker_gitlab/config目录
直接在宿主机上查看即可复制下面Password的密码去登录Gitlab
cat /usr/local/docker/docker_gitlab/config/initial_root_password # WARNING: This value is valid only in the following conditions
# 1. If provided manually (either via GITLAB_ROOT_PASSWORD environment variable or via gitlab_rails[initial_root_password] setting in gitlab.rb, it was provided before database was seeded for the first time (usually, the first reconfigure run).
# 2. Password hasnt been changed manually, either via UI or via command line.
#
# If the password shown here doesnt work, you must reset the admin password following https://docs.gitlab.com/ee/security/reset_user_password.html#reset-your-root-password.Password: nvTUWhHoL6thfBh5y56j5uJHlgTvnCODrljfEW1pjs# NOTE: This file will be automatically deleted in the first reconfigure run after 24 hours.修改密码
登录后进入账户设置里面设置个自定义密码最少8位数