/
iezhelev
/
cppsh_micro
Обзор
Документация
Войти
/
iezhelev
/
cppsh_micro
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
CI/CD
Аналитика
Безопасность
mayor-refactor
Dockerfile.query
27 строк
538 B
iezhelev
query-service off
29 сен 2025, 11:07
29 сен 2025, 11:07
9c18f79
Код
Авторство
О чём код?
# Build stage FROM golang:1.23-alpine AS builder WORKDIR /app # Copy only the files needed for dependency resolution COPY go.mod go.sum ./ # Download dependencies RUN go mod download # Copy the rest of the application code COPY . . # Build the application with optimizations RUN CGO_ENABLED=0 GOOS=linux go build -ldflags="-w -s" -o query ./cmd/query-service/main.go # Final stage FROM alpine:latest WORKDIR /app # Copy only the binary from the builder stage COPY --from=builder /app/query . # Run the application CMD ["./query"]