16 أسطر
358 B
Docker
16 أسطر
358 B
Docker
# 🔷 Auto-generated Dockerfile for Go
|
|
# Ghaymah detected:
|
|
FROM golang:1.22-alpine AS builder
|
|
|
|
WORKDIR /app
|
|
COPY go.mod go.sum* ./
|
|
RUN go mod download 2>/dev/null || true
|
|
COPY . .
|
|
RUN CGO_ENABLED=0 GOOS=linux go build -o /app/bin/app .
|
|
|
|
FROM alpine:3.19
|
|
RUN apk --no-cache add ca-certificates
|
|
COPY --from=builder /app/bin/app /app
|
|
EXPOSE 8080
|
|
CMD ["/app"]
|