xccjk / x-blog

学习笔记
17 stars 2 forks source link

docker #93

Open xccjk opened 1 year ago

xccjk commented 1 year ago

docker上部署gitlab

安装docker

配置docker pull 加速

命令行添加国内源:

vim /etc/docker/daemon.json
{
  "registry-mirrors": [
    "https://ustc-edu-cn.mirror.aliyuncs.com",
    "https://hub-mirror.c.163.com",
    "https://mirror.baidubce.com"
  ]
}
docker restart
docker info

image

docker客户端添加国内源:

"registry-mirrors": [
  "https://ustc-edu-cn.mirror.aliyuncs.com",
  "https://hub-mirror.c.163.com",
  "https://mirror.baidubce.com"
]

image

安装docker gitlab

docker pull gitlab/gitlab-ce
docker pull yrzr/gitlab-ce-arm64v8

image

点击run,在配置页面填入下面内容

image

启动成功后,可以在Containers中查看到启动的容器

image

查询修改gitlab初始化密码

查看gitlab root默认密码

查询root账号密码

sudo docker exec -it gitlab grep 'Password:' /etc/gitlab/initial_root_password

image

修改root账号密码

命令行修改密码

docker ps
docker exec -it <容器名称>bash

image

需要加-e,这一步会有点慢,需要等待一下

gitlab-rails console -e production
# 获取root账户
user = User.where(id: 1).first
# 更新密码
user.password = 'root12345678'
# 确认密码
user.password_confirmation = 'root12345678'
# 保存
user.save!
# 退出
quit

image

通过默认密码登录gitlab,然后在gitlab中修改默认密码

通过root/Hq/TtbROlp6PKXTnhZLd9Fe3TzM4k08iZw5Cxbx2nA4=,登录gitlab,进入gitlab设置页面修改

登录成功后,点击右上角头像,Edit profile -> Password -> 输入命令行获取的密码,输入新密码

image

xccjk commented 1 year ago

docker 上构建 react native

https://dev.to/eliaslecomte/building-react-native-in-docker-4ld1

xccjk commented 1 year ago

docker mas os环境

https://github.com/sickcodes/Docker-OSX

xccjk commented 1 year ago

docker android build

https://github.com/react-native-community/docker-android