Add gotty to Dockerfile.

This commit is contained in:
Qi Xiao 2018-10-20 16:49:33 +01:00
parent 9509cec8d4
commit f907104b0d

View File

@ -1,13 +1,20 @@
FROM golang:alpine as builder
RUN apk update && \
apk add --virtual build-deps make git
# Build gotty
RUN go get -d github.com/yudai/gotty && \
git -C /go/src/github.com/yudai/gotty checkout release-1.0 && \
go get github.com/yudai/gotty
# Build Elvish
COPY . /go/src/github.com/elves/elvish
RUN make -C /go/src/github.com/elves/elvish get
FROM alpine
COPY --from=builder /go/bin/elvish /bin/elvish
COPY --from=builder /go/bin/gotty /bin/gotty
RUN adduser -D elf
RUN apk update && apk add tmux man man-pages vim curl
USER elf
WORKDIR /home/elf
EXPOSE 8080
CMD ["/bin/elvish"]