File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -15,13 +15,26 @@ Or a simple `docker-compose up` (you might want to edit the source of
1515the image in).
1616
1717Add a user:
18- `` docker exec git_server sh add_git_user.sh winlu "`cat ~/.ssh/id_rsa.pub`" ``
18+ ```
19+ docker exec git_server sh add_git_user.sh winlu "`cat ~/.ssh/id_rsa.pub`"
20+ ```
1921
2022Initialize a repo:
21- ` ssh localhost -p 1234 "init my_repo.git" `
23+ ```
24+ ssh localhost -p 1234 "init my_repo.git"
25+ ```
2226
2327Add remote to your git repository:
24- ` git remote add docker_git_server ssh://localhost:1234/~/my_repo.git `
28+ ```
29+ git remote add docker_git_server ssh://localhost:1234/~/my_repo.git
30+ ```
2531
2632And push:
27- ` git push docker_git_server --set-upstream master `
33+ ```
34+ git push docker_git_server --set-upstream master
35+ ```
36+
37+ ## Persistence
38+ It is recommended to use a docker volume for persistence because of
39+ file permission issues. All data (setup users, repositories, ssh server keys)
40+ is kept alive during container removal/upgrade.
You can’t perform that action at this time.
0 commit comments