/
iezhelev
/
cppsh_micro
Обзор
Документация
Войти
/
iezhelev
/
cppsh_micro
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
CI/CD
Аналитика
Безопасность
mayor-refactor
Dockerfile.command
27 строк
538 B
iezhelev
go-1.23
22 сен 2025, 14:57
22 сен 2025, 14:57
f0420fe
Код
Авторство
О чём код?
# 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 command ./cmd/command/main.go # Final stage FROM alpine:latest WORKDIR /app # Copy only the binary from the builder stage COPY --from=builder /app/command . # Run the application CMD ["./command"]