/
iezhelev
/
cppsh_micro
Обзор
Документация
Войти
/
iezhelev
/
cppsh_micro
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
CI/CD
Аналитика
Безопасность
main
Dockerfile.token-validation
27 строк
511 B
iezhelev
first commit
24 фев 2025, 13:52
24 фев 2025, 13:52
7ac2ca6
Код
Авторство
О чём код?
FROM golang:1.22-alpine as builder WORKDIR /app # Copy go.mod and go.sum for dependency management COPY go.mod go.sum ./ # Download dependencies RUN go mod download # Copy the source code COPY . . # Build the binary RUN CGO_ENABLED=0 GOOS=linux go build -o token-validation ./cmd/token-validation # Stage 2: Create a minimal runtime image FROM alpine:latest WORKDIR /root/ # Copy the binary from the builder stage COPY --from=builder /app/token-validation . # Run the binary CMD ["./token-validation"]