Skip to content

Commit b5da02f

Browse files
committed
docker
1 parent de17f60 commit b5da02f

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

Dockerfile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,10 @@ COPY . .
2222
# Copy built frontend files
2323
COPY --from=frontend-builder /app/public ./public
2424

25+
#ENV HTTP_PROXY=http://192.168.3.102:8080
26+
#ENV HTTPS_PROXY=http://192.168.3.102:8080
2527
# Build backend
26-
RUN go build -o tiny-nav
28+
RUN CGO_ENABLED=0 GOOS=linux go build -a -ldflags '-extldflags "-static"' -o tiny-nav
2729

2830
# Stage 3: Final Image
2931
FROM alpine:latest
@@ -36,7 +38,6 @@ WORKDIR /app
3638

3739
# Copy built binary and frontend files
3840
COPY --from=backend-builder /app/tiny-nav .
39-
RUN chmod +x tiny-nav
4041

4142
# Expose port
4243
EXPOSE 58080

0 commit comments

Comments
 (0)