Community maintained Docker config for the spindle server
at main 1.3 kB view raw
1FROM golang:1.24-alpine AS builder 2ENV CGO_ENABLED=1 3 4ARG TAG='v1.10.0-alpha' 5 6WORKDIR /app 7RUN apk add git gcc musl-dev 8RUN git clone -b ${TAG} https://tangled.org/@tangled.org/core . 9RUN go build -o /usr/bin/spindle -ldflags '-s -w -extldflags "-static"' ./cmd/spindle 10 11FROM alpine:edge 12 13ARG PORT=6555 14EXPOSE $PORT 15 16LABEL org.opencontainers.image.title='spindle' 17LABEL org.opencontainers.image.description='CI runner for tangled' 18LABEL org.opencontainers.image.source='https://tangled.org/@keea.dog/spindle-docker' 19LABEL org.opencontainers.image.url='https://tangled.org' 20LABEL org.opencontainers.image.vendor='tangled.org' 21LABEL org.opencontainers.image.licenses='MIT' 22 23ARG UID=1000 24ARG GID=1000 25 26COPY rootfs . 27RUN chmod 755 /etc 28RUN chmod -R 755 /etc/s6-overlay 29RUN apk add shadow s6-overlay execline openssl curl 30RUN groupadd -g $GID -f spindle 31RUN useradd -u $UID -g $GID -d /home/spindle spindle 32RUN openssl rand -hex 16 | passwd --stdin spindle 33RUN mkdir -p /home/spindle/repositories && chown -R spindle:spindle /home/spindle 34COPY --from=builder /usr/bin/spindle /usr/bin 35RUN mkdir /app && chown -R spindle:spindle /app 36 37HEALTHCHECK --interval=60s --timeout=30s --start-period=5s --retries=3 \ 38 CMD curl -f http://localhost:${PORT} || exit 1 39 40ENTRYPOINT ["/init"]