2017-12-13 22:15:58 +08:00
|
|
|
# build
|
2021-04-02 12:14:32 +08:00
|
|
|
FROM golang:1.16.3-alpine as builder
|
2020-04-27 19:09:07 +08:00
|
|
|
RUN apk add --no-cache git gcc musl-dev make
|
2017-12-13 22:15:58 +08:00
|
|
|
WORKDIR /go/src/github.com/moul/gotty-client
|
2020-04-27 19:09:07 +08:00
|
|
|
COPY go.* ./
|
|
|
|
RUN go mod download
|
|
|
|
COPY . ./
|
2017-12-13 22:15:58 +08:00
|
|
|
RUN make install
|
|
|
|
|
|
|
|
# minimal runtime
|
2021-04-15 12:15:05 +08:00
|
|
|
FROM alpine:3.13.5
|
2020-04-27 19:09:07 +08:00
|
|
|
COPY --from=builder /go/bin/gotty-client /bin/
|
2017-12-13 22:15:58 +08:00
|
|
|
ENTRYPOINT ["/bin/gotty-client"]
|