2021-12-06 11:58:01 +00:00
|
|
|
FROM docker.io/debian:bullseye-slim AS builder
|
|
|
|
ARG STAGIT_VERSION=1.0
|
|
|
|
|
|
|
|
RUN apt-get update -y && apt-get install -y --no-install-recommends \
|
|
|
|
git libgit2-dev build-essential
|
|
|
|
|
|
|
|
RUN git clone git://git.codemadness.org/stagit && \
|
|
|
|
cd stagit && git checkout ${STAGIT_VERSION} && make && make PREFIX=/usr DESTDIR=/stagit-build install && \
|
|
|
|
rm -Rf /stagit
|
|
|
|
|
2021-08-27 18:20:58 +00:00
|
|
|
FROM docker.io/debian:bullseye-slim
|
2021-01-13 16:36:50 +00:00
|
|
|
|
2021-03-21 00:16:51 +00:00
|
|
|
RUN apt-get update -y && apt-get install -y --no-install-recommends \
|
2021-12-06 11:58:01 +00:00
|
|
|
ca-certificates openssh-server git libgit2-1.1
|
|
|
|
|
|
|
|
COPY --from=builder /stagit-build /
|
|
|
|
RUN mkdir -p /var/run/sshd
|
2021-01-13 16:36:50 +00:00
|
|
|
|
|
|
|
RUN addgroup --system --gid 10000 git
|
2021-06-30 21:41:32 +00:00
|
|
|
RUN adduser --system --uid 10000 --ingroup git --shell /usr/bin/git-shell --home /var/lib/git git
|
2021-12-06 11:58:01 +00:00
|
|
|
RUN adduser --system --uid 10001 --ingroup git --shell /usr/bin/git-shell --home /var/lib/git/public git-public
|
2021-01-13 16:36:50 +00:00
|
|
|
|
2021-12-06 11:58:01 +00:00
|
|
|
COPY container/config /etc
|
2021-01-13 16:36:50 +00:00
|
|
|
COPY container/run-git-server /run-git-server
|
|
|
|
|
|
|
|
EXPOSE 22
|
|
|
|
CMD ["/run-git-server"]
|