From 297ac3eebdf37f3acd29fb260be9d1533792ca53 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 f442e06ff068c4fc5bb942f16bac1098f5791ad1 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 45f22a7fbaa8590b254c98946163d600c06f3cc1 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 f07c7b84150d1e2a4b2a65b3d9a0c9a26a87810a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Walker=20Gusm=C3=A3o?= Date: Wed, 1 Apr 2020 14:25:25 -0300 Subject: [PATCH 4/6] doc alias --- 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 6585d6348850a2658d694a9f7f6363f4d5fe3557 Mon Sep 17 00:00:00 2001 From: Walker Leite Date: Tue, 2 Jun 2020 12:45:37 -0300 Subject: [PATCH 5/6] revert docker changes --- Dockerfile | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index cf9b6b9..8259bb0 100755 --- a/Dockerfile +++ b/Dockerfile @@ -2,10 +2,8 @@ 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", "/pwd"] +VOLUME ["/root"] ENTRYPOINT ["gtt"] CMD ["--help"] From 914be3c27f586c4c7f7a8091bc9a47629fd27492 Mon Sep 17 00:00:00 2001 From: Walker Leite Date: Tue, 2 Jun 2020 12:53:04 -0300 Subject: [PATCH 6/6] fix 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