this repo has no description
at main 1.2 kB view raw
1from golang:1.24-alpine as builder 2env KNOT_REPO_SCAN_PATH=/home/git/repositories 3env CGO_ENABLED=1 4 5arg TAG='v1.9.0-alpha' 6 7workdir /app 8run apk add git gcc musl-dev 9run git clone -b ${TAG} https://tangled.sh/@tangled.sh/core . 10run go build -o /usr/bin/knot -ldflags '-s -w -extldflags "-static"' ./cmd/knot 11 12from alpine:edge 13expose 5555 14expose 22 15 16label org.opencontainers.image.title='knot' 17label org.opencontainers.image.description='data server for tangled' 18label org.opencontainers.image.source='https://tangled.sh/@tangled.sh/knot-docker' 19label org.opencontainers.image.url='https://tangled.sh' 20label org.opencontainers.image.vendor='tangled.sh' 21label org.opencontainers.image.licenses='MIT' 22 23copy rootfs . 24run chmod 755 /etc 25run chmod -R 755 /etc/s6-overlay 26run apk add shadow s6-overlay execline openssl openssh git curl bash 27run useradd -d /home/git git && openssl rand -hex 16 | passwd --stdin git 28run mkdir -p /home/git/repositories && chown -R git:git /home/git 29copy --from=builder /usr/bin/knot /usr/bin 30run mkdir /app && chown -R git:git /app 31 32healthcheck --interval=60s --timeout=30s --start-period=5s --retries=3 \ 33 cmd curl -f http://localhost:5555 || exit 1 34 35entrypoint ["/init"]