summaryrefslogtreecommitdiffstats
path: root/Dockerfile
diff options
context:
space:
mode:
authorTommy Nguyen <remyabel@gmail.com>2018-12-04 20:38:32 -0500
committerJesse Duffield <jessedduffield@gmail.com>2018-12-09 16:36:12 +1100
commitde37a66ef35d47c033bcc51c4bf420f7366a7335 (patch)
tree9e12077820a80a6dede981d2e9a113f29b52aa91 /Dockerfile
parentff856b763033a241370bfde98d7386b43b7d0893 (diff)
Dockerfile improvements
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"]