From 82d316f69941c3e50cc3f43f944f00292b4fc100 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Walker=20Gusm=C3=A3o?= Date: Wed, 1 Apr 2020 14:13:50 -0300 Subject: [PATCH 1/6] add pwd --- Dockerfile | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 8259bb0..4b0f152 100755 --- a/Dockerfile +++ b/Dockerfile @@ -2,8 +2,10 @@ FROM node:8.2.1-alpine ENV GTT_VERSION 1.7.39 +WORKDIR /pwd + RUN yarn global add --prefix /usr/local "gitlab-time-tracker@$GTT_VERSION" -VOLUME ["/root"] -ENTRYPOINT ["gtt"] +VOLUME ["/root", "/pwd"] +ENTRYPOINT ["gtt", ""] CMD ["--help"] From 9cc69963fcee6f12912c5ff15ab652f1be355413 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Walker=20Gusm=C3=A3o?= Date: Wed, 1 Apr 2020 14:17:00 -0300 Subject: [PATCH 2/6] add pwd doc --- documentation.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/documentation.md b/documentation.md index 01a2e94..ecba3f2 100644 --- a/documentation.md +++ b/documentation.md @@ -70,12 +70,13 @@ you can use the official [Docker image](https://hub.docker.com/r/kriskbx/gitlab- docker run \ --rm -it \ -v ~:/root \ + -v $(pwd):/pwd \ kriskbx/gitlab-time-tracker \ --help ``` `--rm` removes the container after running, `-it` makes it interactive, `-v ~:/root` mounts your home directory to the -home directory inside the container. If you want to store the config in another place, mount another directory: +home directory inside the container, `-v ~$(pwd):/pwd` mounts current directory inside the container to gtt be able to read local config. If you want to store the config in another place, mount another directory: ```shell From ded5e8e99c8d0f3e2f95e10a42e77294ac827e62 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Walker=20Gusm=C3=A3o?= Date: Wed, 1 Apr 2020 14:21:46 -0300 Subject: [PATCH 3/6] fix remove empty entrypoint param --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 4b0f152..cf9b6b9 100755 --- a/Dockerfile +++ b/Dockerfile @@ -7,5 +7,5 @@ WORKDIR /pwd RUN yarn global add --prefix /usr/local "gitlab-time-tracker@$GTT_VERSION" VOLUME ["/root", "/pwd"] -ENTRYPOINT ["gtt", ""] +ENTRYPOINT ["gtt"] CMD ["--help"] From 56c980572a65d1f50280c9e6ed58f2dc631d8823 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Walker=20Gusm=C3=A3o?= Date: Wed, 1 Apr 2020 14:49:51 -0300 Subject: [PATCH 4/6] add alias doc --- documentation.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/documentation.md b/documentation.md index ecba3f2..bbbc53f 100644 --- a/documentation.md +++ b/documentation.md @@ -102,7 +102,7 @@ docker run \ I highly recommend creating an alias and adding it to your `bashrc`: ```shell -echo "alias gtt='docker run --rm -it -v ~:/root kriskbx/gitlab-time-tracker'" >>~/.bashrc +echo "alias gtt='docker run --rm -it -v ~:/root -v $(pwd):/pwd kriskbx/gitlab-time-tracker'" >>~/.bashrc ``` Now you can simply write `gtt` instead of the bulky Docker command before. Try it out: `gtt --help` From 72a813982874ad27e3c1ceff989f28a7f8ea16df Mon Sep 17 00:00:00 2001 From: Walker Leite Date: Mon, 13 Apr 2020 23:02:44 -0300 Subject: [PATCH 5/6] add editor env --- Dockerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/Dockerfile b/Dockerfile index cf9b6b9..2d9509f 100755 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,7 @@ FROM node:8.2.1-alpine ENV GTT_VERSION 1.7.39 +ENV EDITOR vi WORKDIR /pwd From 9726acb810bf93331dc3be62545c4b67f1b53a9f Mon Sep 17 00:00:00 2001 From: Walker Leite Date: Tue, 2 Jun 2020 12:54:35 -0300 Subject: [PATCH 6/6] fix incorrect pwd path --- documentation.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/documentation.md b/documentation.md index bbbc53f..41fe224 100644 --- a/documentation.md +++ b/documentation.md @@ -76,7 +76,7 @@ docker run \ ``` `--rm` removes the container after running, `-it` makes it interactive, `-v ~:/root` mounts your home directory to the -home directory inside the container, `-v ~$(pwd):/pwd` mounts current directory inside the container to gtt be able to read local config. If you want to store the config in another place, mount another directory: +home directory inside the container, `-v $(pwd):/pwd` mounts current directory inside the container to gtt be able to read local config. If you want to store the config in another place, mount another directory: ```shell