mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-02-13 13:59:06 +02:00
[fix] Fixed Dockerfile
This commit is contained in:
parent
5a0ac6fe67
commit
ac406f57ff
14
Dockerfile
14
Dockerfile
@ -2,16 +2,18 @@
|
|||||||
# docker build -t lazygit .
|
# docker build -t lazygit .
|
||||||
# docker run -it lazygit:latest /bin/sh
|
# 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/
|
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
|
RUN CGO_ENABLED=0 GOOS=linux go build
|
||||||
|
|
||||||
FROM alpine:3.11
|
FROM alpine:3.15
|
||||||
RUN apk add -U git xdg-utils
|
RUN apk add --no-cache -U git xdg-utils
|
||||||
WORKDIR /go/src/github.com/jesseduffield/lazygit/
|
WORKDIR /go/src/github.com/jesseduffield/lazygit/
|
||||||
COPY --from=0 /go/src/github.com/jesseduffield/lazygit /go/src/github.com/jesseduffield/lazygit
|
COPY --from=build /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/lazygit /bin/
|
||||||
RUN echo "alias gg=lazygit" >> ~/.profile
|
RUN echo "alias gg=lazygit" >> ~/.profile
|
||||||
|
|
||||||
ENTRYPOINT [ "lazygit" ]
|
ENTRYPOINT [ "lazygit" ]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user