niyam-api / Dockerfile.dev
axyut
url change
8c1976c
raw
history blame contribute delete
484 Bytes
# Dockerfile (modified for development with 'air')
FROM golang:1.24.2-alpine AS builder
WORKDIR /app
ENV GO111MODULE=on \
CGO_ENABLED=0
# for live reload inside the container
RUN go install github.com/air-verse/air@latest
COPY go.mod go.sum ./
RUN go mod download
# no build for development, air will handle it
# COPY . .
# RUN go build -o /app/niyam -ldflags "-s -w" ./main.go
# ---
FROM scratch
WORKDIR /app
COPY --from=builder /app/niyam .
EXPOSE 8080
CMD ["./niyam"]