File size: 525 Bytes
6ee649f
 
 
1900aeb
6ee649f
a163ad7
6ee649f
bcc3986
303ea05
1b0cda1
 
a163ad7
 
 
 
6ee649f
1b0cda1
42230c9
1b0cda1
95b22c6
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
FROM golang:1.22-alpine AS go-builder
WORKDIR /app
COPY main.go .
RUN go mod init nyx-gateway && \
    go get github.com/gorilla/websocket && \
    go build -ldflags="-s -w" -o go-proxy main.go

FROM ghcr.io/sagernet/sing-box:latest
RUN apk add --no-cache ca-certificates bash

WORKDIR /app
COPY --from=go-builder /app/go-proxy /app/go-proxy
COPY config.json /app/config.json
COPY index.html /app/index.html
COPY entrypoint.sh /app/entrypoint.sh
RUN chmod +x /app/entrypoint.sh

EXPOSE 7860

ENTRYPOINT ["/app/entrypoint.sh"]