docker-kubo-alpine/Dockerfile
James Andariese bd3542197a
All checks were successful
Github Actions Demo / Explore-Gitea-Actions (push) Successful in 4s
add yq
2024-03-07 16:01:36 -06:00

29 lines
648 B
Docker

ARG RELEASE=v0.26.0
ARG ALPINE=3.19
ARG GOLANG=1.22
FROM golang:${GOLANG}-alpine${ALPINE} AS builder
ARG RELEASE
RUN apk add --no-cache git
RUN git clone https://github.com/ipfs/kubo -b "release-$RELEASE"
WORKDIR kubo
RUN \
for cmd in \
ipfs \
ipfswatch \
;do (cd cmd/$cmd && go build -o /$cmd);done
FROM alpine:${ALPINE}
COPY --from=builder /ipfs /bin/ipfs
COPY --from=builder /ipfswatch /bin/ipfswatch
RUN apk add --no-cache yq
CMD ["ipfs"]
HEALTHCHECK --interval=30s --timeout=3s --start-period=5s --retries=3 \
CMD ipfs --api=/ip4/127.0.0.1/tcp/5001 dag stat /ipfs/QmUNLLsPACCz1vLxQVkXqqLX5R1X345qqfHbsf67hvA3Nn || exit 1