simple spindle dockerfile
spindle.dockerfile
edited
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
12EXPOSE 6555
13
14RUN apk add --no-cache docker-cli git curl bash
15COPY --from=builder /usr/bin/spindle /usr/bin
16
17HEALTHCHECK --interval=60s --timeout=30s --start-period=5s --retries=3 \
18 CMD curl -f http://localhost:6555 || exit 1
19
20ENTRYPOINT ["spindle"]