الملفات
Ghyamah-task-1-cli2/test-projects/go-web-test/Dockerfile
2026-08-20 21:42:57 +03:00

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"]