lab7: безопасность, mTLS, OpenBao и PKI lifecycle

This commit is contained in:
Vladislav Kunetskiy
2026-11-10 10:58:07 +03:00
parent 3d216fbd50
commit 3441f2269a
183 changed files with 216667 additions and 3165 deletions
+6 -4
View File
@@ -1,9 +1,11 @@
# syntax=docker/dockerfile:1.7
ARG GO_VERSION=1.27.1
ARG GO_VERSION=1.27.3
ARG ALPINE_VERSION=3.22
ARG GO_IMAGE_DIGEST=sha256:fa3d596898d9f126af7c01d14ee7597bab3f39cccf392ef36b69fe77cd681f18
ARG ALPINE_IMAGE_DIGEST=sha256:49340b346798875b5592e5d420241f2f9cfba5f47e62ebb1446a1b34734e898f
FROM golang:${GO_VERSION}-alpine AS build
FROM golang:${GO_VERSION}-alpine@${GO_IMAGE_DIGEST} AS build
# Platform of the produced binaries. Left empty on purpose: the classic builder
# does not supply these args, and the previous hardcoded `amd64` default silently
# produced x86-64 binaries inside an arm64 image. Those ran under emulation and
@@ -55,7 +57,7 @@ RUN CGO_ENABLED=0 GOOS=${TARGETOS} GOARCH=${TARGETARCH} \
-ldflags="-s -w -X main.version=${VERSION}" \
-o /out/jobctl ./cmd/jobctl
FROM alpine:${ALPINE_VERSION} AS runtime
FROM alpine:${ALPINE_VERSION}@${ALPINE_IMAGE_DIGEST} AS runtime
RUN apk add --no-cache ca-certificates wget \
&& addgroup -S -g 10001 app \
&& adduser -S -D -H -u 10001 -G app app
@@ -72,6 +74,6 @@ USER 10001:10001
EXPOSE 8080
STOPSIGNAL SIGTERM
HEALTHCHECK --interval=10s --timeout=3s --start-period=5s --retries=3 \
CMD wget -q -O /dev/null "http://127.0.0.1:${SERVER_PORT:-8080}/health/live" || exit 1
CMD wget -q -O /dev/null http://127.0.0.1:8084/health/live || exit 1
ENTRYPOINT ["/usr/local/bin/messenger"]