mirror of
https://github.com/jesseduffield/lazygit.git
synced 2024-11-24 08:52:21 +02:00
57ac9c2189
We'll need this to use the slices.Sort function in the next commit. It would also be possible to use sort.Ints instead, but it's slower.
20 lines
557 B
Docker
20 lines
557 B
Docker
# run with:
|
|
# docker build -t lazygit .
|
|
# docker run -it lazygit:latest /bin/sh
|
|
|
|
FROM golang:1.21 as build
|
|
WORKDIR /go/src/github.com/jesseduffield/lazygit/
|
|
COPY go.mod go.sum ./
|
|
RUN go mod download
|
|
COPY . .
|
|
RUN CGO_ENABLED=0 GOOS=linux go build
|
|
|
|
FROM alpine:3.15
|
|
RUN apk add --no-cache -U git xdg-utils
|
|
WORKDIR /go/src/github.com/jesseduffield/lazygit/
|
|
COPY --from=build /go/src/github.com/jesseduffield/lazygit ./
|
|
COPY --from=build /go/src/github.com/jesseduffield/lazygit/lazygit /bin/
|
|
RUN echo "alias gg=lazygit" >> ~/.profile
|
|
|
|
ENTRYPOINT [ "lazygit" ]
|