# Development Dockerfile for hot reload FROM golang:1.25-alpine AS builder # Install air for hot reload RUN go install github.com/air-verse/air@latest # Set working directory WORKDIR /app # Copy go mod files COPY go.mod go.sum ./ # Download dependencies RUN go mod download # Copy air configuration COPY .air.toml ./ # Copy source code COPY . ./ # Note: Source code will be mounted via volume, not copied # Expose port EXPOSE 8080 # Command to run air for hot reload CMD ["sh", "-c", "if [ -f .air.toml ]; then air -c .air.toml; else air; fi"]