| ADD alpine-minirootfs-3.24.1-aarch64.tar.gz / # buildkit |
| CMD ["/bin/sh"] |
| ENV KNOT_REPO_SCAN_PATH=/home/git/repositories |
| EXPOSE [5555/tcp] |
| EXPOSE [22/tcp] |
| LABEL org.opencontainers.image.title=knot |
| LABEL org.opencontainers.image.description=data server for tangled |
| LABEL org.opencontainers.image.source=https://tangled.org/did:plc:f5s5la5wlofsxidb3zemdune |
| LABEL org.opencontainers.image.url=https://tangled.org |
| LABEL org.opencontainers.image.vendor=tangled.org |
| LABEL org.opencontainers.image.licenses=MIT |
| ARG UID=1000 |
| ARG GID=1000 |
| COPY rootfs . # buildkit |
| RUN |2 UID=1000 GID=1000 /bin/sh -c chmod 755 /etc # buildkit |
| RUN |2 UID=1000 GID=1000 /bin/sh -c chmod -R 755 /etc/s6-overlay # buildkit |
| RUN |2 UID=1000 GID=1000 /bin/sh -c apk add shadow s6-overlay execline openssl openssh git curl bash # buildkit |
| RUN |2 UID=1000 GID=1000 /bin/sh -c groupadd -g $GID -f git # buildkit |
| RUN |2 UID=1000 GID=1000 /bin/sh -c useradd -u $UID -g $GID -d /home/git git # buildkit |
| RUN |2 UID=1000 GID=1000 /bin/sh -c openssl rand -hex 16 | passwd --stdin git # buildkit |
| RUN |2 UID=1000 GID=1000 /bin/sh -c mkdir -p /home/git/repositories && chown -R git:git /home/git # buildkit |
| COPY /usr/bin/knot /usr/bin # buildkit |
| RUN |2 UID=1000 GID=1000 /bin/sh -c mkdir /app && chown -R git:git /app # buildkit |
| HEALTHCHECK {Test:[CMD-SHELL curl -f http://localhost:5555 || exit 1] Interval:1m0s Timeout:30s StartPeriod:5s StartInterval:0s Retries:3} |
| ENTRYPOINT ["/init"] |