ЛР 2 — БВТ2303 — Брезгунова — на 5

This commit is contained in:
2026-10-22 13:28:45 +03:00
parent 65003b6119
commit 9ac1762101
31 changed files with 3387 additions and 37 deletions
+14
View File
@@ -0,0 +1,14 @@
FROM golang:1.24.7-alpine3.22 AS build
WORKDIR /src
COPY go.mod go.sum ./
RUN go mod download
COPY . .
RUN go test ./... && go vet ./...
RUN CGO_ENABLED=0 go build -trimpath -ldflags="-s -w" -o /out/messenger .
FROM alpine:3.22.1
RUN addgroup -S app && adduser -S -G app app
COPY --from=build /out/messenger /usr/local/bin/messenger
USER app
EXPOSE 8080
ENTRYPOINT ["messenger"]