Spaces:
Paused
Paused
Update Dockerfile
Browse files- Dockerfile +20 -2
Dockerfile
CHANGED
|
@@ -1,2 +1,20 @@
|
|
| 1 |
-
FROM
|
| 2 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
FROM node:16 as js-build
|
| 2 |
+
WORKDIR /gotty
|
| 3 |
+
COPY js /gotty/js
|
| 4 |
+
COPY Makefile /gotty/
|
| 5 |
+
RUN make bindata/static/js/gotty.js.map
|
| 6 |
+
|
| 7 |
+
FROM golang:1.16 as go-build
|
| 8 |
+
WORKDIR /gotty
|
| 9 |
+
COPY . /gotty
|
| 10 |
+
COPY --from=js-build /gotty/js/node_modules /gotty/js/node_modules
|
| 11 |
+
COPY --from=js-build /gotty/bindata/static/js /gotty/bindata/static/js
|
| 12 |
+
RUN CGO_ENABLED=0 make
|
| 13 |
+
|
| 14 |
+
FROM alpine:latest
|
| 15 |
+
RUN apk update && \
|
| 16 |
+
apk upgrade && \
|
| 17 |
+
apk --no-cache add ca-certificates bash
|
| 18 |
+
WORKDIR /root
|
| 19 |
+
COPY --from=go-build /gotty/gotty /usr/bin/
|
| 20 |
+
CMD ["gotty", "-w", "bash"]
|