2018-09-04 11:03:35 +02:00
|
|
|
# run with:
|
|
|
|
# docker build -t lazygit .
|
2020-06-07 03:31:30 +02:00
|
|
|
# docker run -it lazygit:latest /bin/sh
|
2018-09-04 11:03:35 +02:00
|
|
|
|
2022-03-26 23:54:32 +02:00
|
|
|
FROM golang:1.18 as build
|
2018-12-05 03:38:32 +02:00
|
|
|
WORKDIR /go/src/github.com/jesseduffield/lazygit/
|
2022-03-26 23:54:32 +02:00
|
|
|
COPY go.mod go.sum ./
|
|
|
|
RUN go mod download
|
|
|
|
COPY . .
|
2019-03-02 12:36:35 +02:00
|
|
|
RUN CGO_ENABLED=0 GOOS=linux go build
|
2018-09-04 11:03:35 +02:00
|
|
|
|
2022-03-26 23:54:32 +02:00
|
|
|
FROM alpine:3.15
|
|
|
|
RUN apk add --no-cache -U git xdg-utils
|
2018-12-05 13:11:30 +02:00
|
|
|
WORKDIR /go/src/github.com/jesseduffield/lazygit/
|
2022-03-26 23:54:32 +02:00
|
|
|
COPY --from=build /go/src/github.com/jesseduffield/lazygit ./
|
|
|
|
COPY --from=build /go/src/github.com/jesseduffield/lazygit/lazygit /bin/
|
2018-12-06 00:53:36 +02:00
|
|
|
RUN echo "alias gg=lazygit" >> ~/.profile
|
2020-06-07 03:31:30 +02:00
|
|
|
|
|
|
|
ENTRYPOINT [ "lazygit" ]
|