# Dockerfile.local # Optimized for local development with hot reload # Build stage FROM golang:1.24.3-alpine AS builder # Install necessary tools for development RUN apk add --no-cache git make gcc libc-dev # Install Air for hot reload RUN go install github.com/air-verse/air@latest # Set working directory WORKDIR /app # Copy go.mod and go.sum files COPY go.mod go.sum* ./ # Download dependencies RUN go mod download # Copy the entire project COPY . . # Expose port EXPOSE 3000 # Set environment variable for development ENV APP_ENV=development # Command to run the application with hot reload CMD ["air", "-c", ".air.toml"]