FROM golang:1.24 AS development # Install Air for hot reloading (using the updated repository) RUN go install github.com/air-verse/air@latest # Set working directory WORKDIR /app # Copy go mod and sum files COPY go.mod go.sum ./ # Download all dependencies RUN go mod download # Copy the source code COPY . . # Expose the application port EXPOSE 8080 # Command to run the application with Air for hot reloading CMD ["air"]