Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add pwd to docker container (kriskbx#108)
* add pwd
* add pwd doc
* add editor env
  • Loading branch information
klarkc authored Jun 3, 2020
commit c4692a54f64178bef9b9d43fe2d0c9b7683b44b0
5 changes: 4 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
FROM node:8.2.1-alpine

ENV GTT_VERSION 1.7.39
ENV EDITOR vi

WORKDIR /pwd

RUN yarn global add --prefix /usr/local "gitlab-time-tracker@$GTT_VERSION"

VOLUME ["/root"]
VOLUME ["/root", "/pwd"]
ENTRYPOINT ["gtt"]
CMD ["--help"]
5 changes: 3 additions & 2 deletions documentation.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -101,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`
Expand Down