Files
Thomas Nilles 693b3a94b1 Upgrade Go version and add Air to Dockerfile
Add Air live‑reload tool and update the base image to golang:1.25.
Configure docker‑compose with code mounts and a cached Go module
volume, and switch the container command to run Air.
2026-01-15 01:41:59 -05:00

23 lines
584 B
Docker
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Use the official Golang image as the base.
FROM golang:1.25-alpine AS base
# Install git (required by go modules) and any other utilities.
RUN apk add --no-cache git
# Set the working directory inside the container.
WORKDIR /app
# Install Air (livereload tool for Go).
ENV PATH="/go/bin:${PATH}"
RUN go install github.com/air-verse/air@latest
# Cache go.mod and go.sum to speed up dependency installation.
COPY go.mod go.sum ./
RUN go mod download
# Copy the rest of the source code.
COPY . .
# Use Air to watch source files and run the app.
CMD ["air", "-c", ".air.toml"]