Files
Assistant/deploy/images/runtime.Dockerfile
m d5cd964e51
CI / test (push) Successful in 11s
CI / test (pull_request) Successful in 11s
deploy: attest production artifact revision
2026-08-16 19:53:00 +03:00

17 lines
562 B
Docker

# syntax=docker/dockerfile:1
FROM golang:1.26.6-alpine AS build
WORKDIR /src
COPY go.mod ./
COPY . .
ARG TARGET
RUN CGO_ENABLED=0 GOOS=linux go build -trimpath -o /out/runtime ./cmd/${TARGET}
FROM alpine:3.23
ARG SOURCE_REVISION=unknown
LABEL org.opencontainers.image.revision=$SOURCE_REVISION \
org.opencontainers.image.source="https://git.cin.su/m/Assistant.git"
RUN addgroup -S assistant && adduser -S -G assistant assistant
USER assistant
COPY --from=build /out/runtime /usr/local/bin/assistant-runtime
ENTRYPOINT ["/usr/local/bin/assistant-runtime"]