Initial revision

This commit is contained in:
Jason Swank
2026-05-11 12:30:42 -04:00
commit c92a46c49d
5 changed files with 188 additions and 0 deletions

25
Dockerfile Normal file
View File

@@ -0,0 +1,25 @@
# Use the official Golang image to create a build artifact.
FROM golang:1.25.9 as builder
# Create and change to the app directory.
WORKDIR /app
# Retrieve application dependencies.
COPY go.* ./
RUN go mod download
# Copy local code to the container image.
COPY . ./
# Build the binary.
RUN CGO_ENABLED=0 GOOS=linux go build -v -o server
# Use a Docker multi-stage build to create a lean production image.
FROM alpine:3.23
RUN apk add --no-cache ca-certificates
# Copy the binary to the production image from the builder stage.
COPY --from=builder /app/server /server
# Run the web service on container startup.
CMD ["/server"]