Skip to content

Commit

Permalink
[fix] Fixed Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
adriang-90 authored and jesseduffield committed Mar 27, 2022
1 parent 5a0ac6f commit ac406f5
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,18 @@
# docker build -t lazygit .
# docker run -it lazygit:latest /bin/sh

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

FROM alpine:3.11
RUN apk add -U git xdg-utils
FROM alpine:3.15
RUN apk add --no-cache -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/
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" ]

0 comments on commit ac406f5

Please sign in to comment.