docs4you commited on
Commit
a9d0276
·
verified ·
1 Parent(s): 7418888

Upload Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +17 -0
Dockerfile ADDED
@@ -0,0 +1,17 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM golang:1.24-alpine AS builder
2
+
3
+ WORKDIR /app
4
+ COPY src/go.mod src/go.sum ./
5
+ RUN go mod download
6
+
7
+ COPY src/ .
8
+ RUN CGO_ENABLED=0 GOOS=linux go build -ldflags="-s -w" -trimpath -o hubproxy .
9
+
10
+ FROM alpine
11
+
12
+ WORKDIR /root/
13
+
14
+ COPY --from=builder /app/hubproxy .
15
+ COPY --from=builder /app/config.toml .
16
+
17
+ CMD ["./hubproxy"]