@@ -19,6 +19,67 @@ go get -insecure -u 0.0.0.0/user/pkg
1919go run server.go
2020```
2121
22+ #### Run GitLab Docker server:
23+
24+ ``` bash
25+ # run the docker container and expose port 443 and 8000
26+ # don't forget to map the volumes correctly as shown below
27+ # we use port 8000 to not collapse with port 80 which we need by server.go
28+ docker run --detach \
29+ --hostname gitlab.example.com \
30+ --publish 443:443 --publish 8000:80 \
31+ --restart always \
32+ --volume ~ /Desktop/gitlab/config:/etc/gitlab \
33+ --volume ~ /Desktop/gitlab/log:/var/log/gitlab \
34+ --volume ~ /Desktop/gitlab/opt:/var/opt/gitlab \
35+ gitlab/gitlab-ce:latest
36+
37+ # display real time logs for GitLab created container
38+ docker logs --follow [CONTAINER_ID]
39+
40+ # WAIT TILL IT FINISHES
41+
42+ # open up localhost:8000
43+
44+ # set up a new password, preferably something which uses
45+ # Uppercase, letters, numbers, alphanumeric characters
46+ # otherwise GitLab won't allow you to go further
47+ # something like: Pas$word123456
48+
49+ # login with the credentials:
50+ # username: root
51+ # password: [PASSWORD_YOU_CREATED]
52+
53+ # create a repository from the admin panel and name it `some-test`
54+
55+ # clone the created repository on your local machine
56+ git clone http://localhost:8000/root/some-test.git
57+
58+ # add the go pkg shown bellow and save it inside pkg.go
59+
60+ git add -A
61+
62+ git commit -m " initial commit"
63+
64+ git push
65+
66+ # input your username: root
67+ # input your password: which you created
68+
69+ # DONE
70+ ```
71+
72+ ###### pkg.go
73+ ``` go
74+ package pkg // import "0.0.0.0/user/pkg"
75+
76+ import " fmt"
77+
78+ func New () {
79+ fmt.Println (" Welcome to pkg! (GitLab - Docker)" )
80+ }
81+ ```
82+
2283#### More info
2384
2485Note: import path checking is disabled when using
0 commit comments