summaryrefslogtreecommitdiffstats
path: root/Dockerfile
blob: aec4ff2a03e74fffc365621cd4a7bbd22b3f4fce (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
# run with:
# docker build -t lazygit .
# docker run -it lazygit:latest /bin/sh

FROM golang:1.14-alpine3.11
WORKDIR /go/src/github.com/jesseduffield/lazygit/
COPY ./ .
RUN CGO_ENABLED=0 GOOS=linux go build

FROM alpine:3.11
RUN apk add -U git xdg-utils
WORKDIR /go/src/github.com/jesseduffield/lazygit/
COPY --from=0 /go/src/github.com/jesseduffield/lazygit /go/src/github.com/jesseduffield/lazygit
COPY --from=0 /go/src/github.com/jesseduffield/lazygit/lazygit /bin/
RUN echo "alias gg=lazygit" >> ~/.profile

ENTRYPOINT [ "lazygit" ]