this repo has no description
at main 1.1 kB view raw
1FROM golang:1.23-alpine AS build 2 3RUN apk add git go gcc musl-dev 4 5RUN git clone https://tangled.sh/@tangled.sh/core /src 6WORKDIR /src 7 8ENV CGO_ENABLED=1 9RUN go mod download 10RUN go build -o ./bin/knotserver ./cmd/knotserver 11RUN go build -o ./bin/keyfetch ./cmd/keyfetch 12RUN go build -o ./bin/repoguard ./cmd/repoguard 13 14 15FROM alpine 16 17RUN apk add git openssh-server su-exec 18RUN addgroup -g 1000 git && \ 19 adduser -D -u 1000 -G git -h /home/git git && \ 20 mkdir -p /home/git && \ 21 chown -R git:git /home/git && \ 22 passwd -u git 23 24COPY --from=build /src/bin/knotserver /usr/bin/knotserver 25COPY --from=build /src/bin/keyfetch /usr/bin/keyfetch 26COPY --from=build /src/bin/repoguard /usr/bin/repoguard 27 28COPY sshd_config /etc/ssh/sshd_config 29COPY entrypoint.sh /entrypoint.sh 30 31ENV KNOT_REPO_SCAN_PATH=/home/git 32ENV KNOT_REPO_MAIN_BRANCH=main 33ENV KNOT_SERVER_DB_PATH=/home/git/knotserver.db 34ENV APPVIEW_ENDPOINT=https://tangled.sh 35ENV KNOT_SERVER_INTERNAL_LISTEN_ADDR=0.0.0.0:5444 36ENV KNOT_SERVER_LISTEN_ADDR=0.0.0.0:5555 37 38ENTRYPOINT ["/entrypoint.sh"]