File tree 1 file changed +13
-5
lines changed
1 file changed +13
-5
lines changed Original file line number Diff line number Diff line change
1
+ # Build stage for GoTTY
2
+ FROM golang:alpine AS gotty-builder
3
+
4
+ # Install git for go install to fetch the repository
5
+ RUN apk add --no-cache git
6
+
7
+ # Install GoTTY from source
8
+ RUN go install github.com/sorenisanerd/
[email protected]
9
+
10
+ # Final stage
1
11
FROM alpine:3.18.6
2
12
3
13
EXPOSE 22 80 443 1180 11443 8080
@@ -47,11 +57,9 @@ COPY nginx.conf /etc/nginx/nginx.conf
47
57
COPY .bashrc /root/.bashrc
48
58
RUN echo 'if [ -f ~/.bashrc ]; then . ~/.bashrc; fi' > /root/.bash_profile
49
59
50
- # Install GoTTY binary only - NOT starting it automatically
51
- RUN wget -q -O /tmp/gotty.tar.gz https://github.com/sorenisanerd/gotty/releases/download/v1.5.0/gotty_v1.5.0_linux_amd64.tar.gz && \
52
- tar -zxf /tmp/gotty.tar.gz -C /usr/local/bin && \
53
- rm /tmp/gotty.tar.gz && \
54
- chmod +x /usr/local/bin/gotty
60
+ # Copy GoTTY binary from the build stage
61
+ COPY --from=gotty-builder /go/bin/gotty /usr/local/bin/
62
+ RUN chmod +x /usr/local/bin/gotty
55
63
56
64
# Create directories for GoTTY service
57
65
RUN mkdir -p /var/run/gotty /var/log/gotty
You can’t perform that action at this time.
0 commit comments