You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: readme.md
+49Lines changed: 49 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -13,6 +13,7 @@ stored on GitLab.
13
13
*[requirements](#requirements)
14
14
*[installation](#installation)
15
15
*[updating](#updating)
16
+
*[docker](#docker)
16
17
*[commands](#commands)
17
18
*[I) configuration](#i-configuration)
18
19
*[II) time tracking](#ii-time-tracking)
@@ -74,6 +75,54 @@ yarn global upgrade gitlab-time-tracker
74
75
npm install -g gitlab-time-tracker
75
76
```
76
77
78
+
## docker
79
+
80
+
You don't need to have node and gtt installed on your system in order to use gtt,
81
+
you can use the official [Docker image](https://hub.docker.com/r/kriskbx/gitlab-time-tracker) as well:
82
+
83
+
```shell
84
+
docker run \
85
+
--rm -it \
86
+
-v ~:/root \
87
+
kriskbx/gitlab-time-tracker \
88
+
--help
89
+
```
90
+
91
+
`--rm` removes the container after running, `-it` makes it interactive, `-v ~:/root` mounts your home directory to the
92
+
home directory inside the container. If you want to store the config in another place, mount another directory:
93
+
94
+
95
+
```shell
96
+
docker run \
97
+
--rm -it \
98
+
-v /path/to/gtt-config:/root \
99
+
kriskbx/gitlab-time-tracker \
100
+
--help
101
+
```
102
+
103
+
... or use a Docker volume:
104
+
105
+
```shell
106
+
docker volume create gtt-config
107
+
108
+
docker run \
109
+
--rm -it \
110
+
-v gtt-config:/root \
111
+
kriskbx/gitlab-time-tracker \
112
+
--help
113
+
```
114
+
115
+
I highly recommend creating an alias and adding it to your `bashrc`:
116
+
117
+
```shell
118
+
echo"alias gtt='docker run --rm -it -v ~:/root kriskbx/gitlab-time-tracker'">>~/.bash_rc
119
+
```
120
+
121
+
Now you can simply write `gtt` instead of the bulky Docker command before. Try it out: `gtt --help`
122
+
123
+
**Note:** If you want to save reports via the `--file` parameter, make sure to save them in `/root` or another
124
+
mounted directory that you have access to on your host machine. Take a look at the [Docker documentation](https://docs.docker.com/engine/tutorials/dockervolumes/) about how Docker handles data and volumes.
0 commit comments