-
-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathDockerfile
More file actions
29 lines (19 loc) · 528 Bytes
/
Dockerfile
File metadata and controls
29 lines (19 loc) · 528 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
FROM golang:1.23-alpine AS builder
WORKDIR /app
# Copy go.mod and go.sum files
COPY go.mod go.sum ./
# Download dependencies
RUN go mod download
# Copy the source code
COPY . .
# Build the application
RUN CGO_ENABLED=0 GOOS=linux go build -o go-wol-proxy .
# Create a minimal runtime image
FROM alpine:3.22
WORKDIR /app
# Copy the binary from the builder stage
COPY --from=builder /app/go-wol-proxy /app/
# Expose the default port
EXPOSE 8080
# Run the application
ENTRYPOINT ["/app/go-wol-proxy", "/app/config.toml"]