Ctrl K
ComunidadGuías…

Dockerfile.runtime

Rama main · réplica de lectura del repositorio original.

Archivo original ↗Preguntar a KiBot
# Build and run Vylk as a standalone multi-platform container image.

FROM --platform=$BUILDPLATFORM golang:1.27-alpine AS build

ARG TARGETOS=linux
ARG TARGETARCH
ARG VERSION
ARG GIT_SHA=unknown

WORKDIR /build
COPY go.mod go.sum ./
RUN go mod download
COPY . .

RUN apk add --no-cache python3

RUN VERSION="${VERSION}" python3 build.py \
    --target-os "${TARGETOS}" \
    --target-arch "${TARGETARCH}" \
    --output /build/vylk

FROM gcr.io/distroless/static-debian12 AS runtime

ENV PORT=8080 \
    VYLK_DIR=/data/notes \
    VYLK_DB=/data/vylk.db

COPY --from=build /build/vylk /vylk

VOLUME ["/data"]
EXPOSE 8080
STOPSIGNAL SIGTERM
ENTRYPOINT ["/vylk"]