climech / grit

Multitree-based personal task manager
MIT License
1.67k stars 48 forks source link

Dockerfile #14

Closed Isammoc closed 3 years ago

Isammoc commented 3 years ago

Hello!

Thanks for this amazing project. I saw it from lobste.rs. I discovered the existence of multitree, and I will dig into that field.

Nonetheless, I am not fond of golang and don't want to install it on my machine, so I created a Dockerfile to compile and then run your project.

In a Dockerfile file at the root of your project:

FROM golang:1.16.3 AS build-env

WORKDIR /src
ADD . /src

RUN make

FROM ubuntu
COPY --from=build-env /src/grit /
ENTRYPOINT ["/grit"]

I built like this:

$ docker build -t grit .

And an alias:

$ alias grit='docker run --rm -it -v "$HOME/.config/grit":"/root/.config/grit" grit'

And I was able to follow your samples.

You may perhaps take advantage of the dockerhub automated builds and propose a built version of your project.

Note: I tried to make a distroless image, but I fall for the libc6 dependencies. Note2: I can create a PR if you like the idea.

climech commented 3 years ago

Hello! I already have a working Dockerfile on a local branch, I kind of forgot about it. It's holiday time here and I can't access it now, but I will include it in the next release -- just letting you know since I see you made a PR.

Thanks for the kind words and the lobsters link, it's very cool seeing all the positive responses.

Isammoc commented 3 years ago

No problem.

As I saw you added a 👍 on the issue, I thought that was the signal to make the PR.

Feel free to close both any time you want.

Have fun with your project and the incoming notoriety

climech commented 3 years ago

In the end I went with goreleaser builds to address this issue (see #15).