هذا الالتزام موجود في:
2026-07-26 19:57:48 +03:00
التزام a6e65f3f37
29 ملفات معدلة مع 3538 إضافات و0 حذوفات

عرض الملف

@@ -0,0 +1,34 @@
# Build stage
FROM golang:1.26-alpine AS builder
WORKDIR /app
# Copy dependency files first to leverage Docker cache
COPY go.mod ./
# Copy source code
COPY . .
# Build the application
RUN go build -o server .
# Runtime stage
FROM alpine:3.20
# Create a non-root user
RUN adduser -D appuser
WORKDIR /app
# Copy the compiled binary
COPY --from=builder /app/server .
# Run as non-root user
USER appuser
# Document the application port
EXPOSE 8080
# Start the application
CMD ["./server"]