feat: increased security
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
2026-02-21 21:05:47 +03:00
parent 04830681b9
commit 8befcc11c1
14 changed files with 233 additions and 50 deletions

View File

@@ -7,12 +7,19 @@ RUN go mod download && go mod verify
COPY . ./
RUN go build -o bin/application ./cmd
RUN CGO_ENABLED=0 go build -o bin/application ./cmd
FROM alpine:3.21 AS runner
RUN addgroup -S app && adduser -S app -G app
WORKDIR /opt
COPY --from=builder --chown=app:app /opt/bin/application ./
USER app
CMD ["./application"]
COPY --from=builder /opt/bin/application ./
CMD ["./application"]