docker run --name hexo_nginx --network=host -v /hexo_nginx/www/html:/usr/share/nginx/html -d nginx
设置权限
1
chmod -R 777 /hexo_nginx
git
自己安装git,我还是相信你会的
1
useradd -m -s /bin/bash git
-m 参数表示创建用户的同时创建用户的家目录
-s /bin/bash 参数表示将用户的默认 shell 设置为 Bash
更改密码
1
passwd git
切换git用户
1
su - git
创建Git文件夹
1
[git@archlinux ~]$ mkdir Git
进入Git文件夹
1 2
[git@archlinux ~]$ cd Git/ [git@archlinux Git]$
创建一个裸仓库
1 2 3 4 5 6 7 8 9 10 11
[git@archlinux Git]$ git init --bare hexo_nginx.git hint: Using 'master' as the name for the initial branch. This default branch name hint: is subject to change. To configure the initial branch name to use in all hint: of your new repositories, which will suppress this warning, call: hint: hint: git config --global init.defaultBranch <name> hint: hint: Names commonly chosen instead of 'master' are 'main', 'trunk' and hint: 'development'. The just-created branch can be renamed via this command: hint: hint: git branch -m <name>