summaryrefslogtreecommitdiffstats
path: root/Dockerfile
diff options
context:
space:
mode:
Diffstat (limited to 'Dockerfile')
-rw-r--r--Dockerfile13
1 files changed, 7 insertions, 6 deletions
diff --git a/Dockerfile b/Dockerfile
index 092e82a46..5da545278 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -3,11 +3,12 @@
# docker run -it lazygit:latest
FROM golang:alpine
+WORKDIR /go/src/github.com/jesseduffield/lazygit/
+COPY ./ .
+RUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o lazygit .
+FROM alpine:latest
RUN apk add -U git xdg-utils
-
-ADD . /go/src/github.com/jesseduffield/lazygit
-
-RUN go install github.com/jesseduffield/lazygit
-
-WORKDIR /go/src/github.com/jesseduffield/lazygit \ No newline at end of file
+WORKDIR /root/
+COPY --from=0 /go/src/github.com/jesseduffield/lazygit/lazygit .
+CMD ["./lazygit"]