mirror of
https://github.com/sorenisanerd/gotty.git
synced 2024-11-12 16:44:24 +00:00
21 lines
532 B
Docker
21 lines
532 B
Docker
FROM node:16 as js-build
|
|
WORKDIR /gotty
|
|
COPY js /gotty/js
|
|
COPY Makefile /gotty/
|
|
RUN make bindata/static/js/gotty.js.map
|
|
|
|
FROM golang:1.16 as go-build
|
|
WORKDIR /gotty
|
|
COPY . /gotty
|
|
COPY --from=js-build /gotty/js/node_modules /gotty/js/node_modules
|
|
COPY --from=js-build /gotty/bindata/static/js /gotty/bindata/static/js
|
|
RUN CGO_ENABLED=0 make
|
|
|
|
FROM alpine:latest
|
|
RUN apk update && \
|
|
apk upgrade && \
|
|
apk --no-cache add ca-certificates bash
|
|
WORKDIR /root
|
|
COPY --from=go-build /gotty/gotty /usr/bin/
|
|
CMD ["gotty", "-w", "bash"]
|