29 lines
829 B
Docker
29 lines
829 B
Docker
FROM docker.io/golang:1.26-alpine AS builder
|
|
|
|
LABEL org.opencontainers.image.authors="Daniele Tricoli <eriol@mornie.org>" \
|
|
org.opencontainers.image.source="https://github.com/eriol/oci-yarr"
|
|
|
|
WORKDIR /app
|
|
ENV CGO_ENABLED=1
|
|
|
|
RUN apk -U --no-cache add build-base git nodejs npm
|
|
RUN git clone --depth 1 --branch v2.9 https://github.com/nkanaev/yarr
|
|
|
|
WORKDIR /app/yarr
|
|
RUN npm ci
|
|
RUN make host
|
|
|
|
FROM docker.io/alpine:latest
|
|
|
|
LABEL org.opencontainers.image.authors="Daniele Tricoli <eriol@mornie.org>" \
|
|
org.opencontainers.image.source="https://github.com/eriol/oci-yarr"
|
|
|
|
RUN apk -U --no-cache upgrade \
|
|
&& apk add --no-cache ca-certificates \
|
|
&& update-ca-certificates
|
|
|
|
COPY --from=builder /app/yarr/out/yarr /bin/yarr
|
|
|
|
EXPOSE 7070
|
|
ENTRYPOINT ["/bin/yarr"]
|
|
CMD ["-addr", "0.0.0.0:7070", "-db", "/data/yarr.db"]
|