Add git-daemon docker container
Change-Id: I1d3632c43a9ec551164401beecbaf94a49e2a470
This commit is contained in:
parent
d8f0860056
commit
c3835fc65e
|
@ -0,0 +1,17 @@
|
|||
FROM debian:latest
|
||||
MAINTAINER laforge@gnumonks.org
|
||||
|
||||
ENV DEBIAN_FRONTEND noninteractive
|
||||
|
||||
# Install git
|
||||
RUN apt-get update -qq
|
||||
|
||||
RUN apt-get install -qqy git
|
||||
|
||||
ADD git-daemon.sh /usr/bin/git-daemon.sh
|
||||
VOLUME /git
|
||||
|
||||
# git daemon ports
|
||||
EXPOSE 9418
|
||||
|
||||
CMD /usr/bin/git-daemon.sh
|
|
@ -0,0 +1,21 @@
|
|||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2015 Cédric Vanet
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a
|
||||
copy of this software and associated documentation files (the "Software"),
|
||||
to deal in the Software without restriction, including without limitation
|
||||
the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
and/or sell copies of the Software, and to permit persons to whom the
|
||||
Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
DEALINGS IN THE SOFTWARE.
|
|
@ -0,0 +1 @@
|
|||
include ../make/Makefile
|
|
@ -0,0 +1,36 @@
|
|||
#!/bin/bash
|
||||
|
||||
#* STRICT_PATHS : 0 or 1, default 0
|
||||
#* INIT_TIMEOUT : numeric, 0 - use git default value
|
||||
#* TIMEOUT : numeric, 0 - use git default value
|
||||
#* MAX_CONNECTIONS : numeric, default 32
|
||||
#* VERBOSE : 0 or 1, default 0
|
||||
#* REUSEADDR : 0 or 1, default 1
|
||||
|
||||
ARGS=""
|
||||
|
||||
if [[ "${STRICT_PATHS}" == "1" ]]; then
|
||||
ARGS="${ARGS} --strict-paths"
|
||||
fi
|
||||
|
||||
if [ -z "${REUSEADDR}" ] || [ "${REUSEADDR}" == "1" ]; then
|
||||
ARGS="${ARGS} --reuseaddr"
|
||||
fi
|
||||
|
||||
if [ -z "${VERBOSE}" ] || [ "${VERBOSE}" == "1" ]; then
|
||||
ARGS="${ARGS} --verbose"
|
||||
fi
|
||||
|
||||
if [ -n "${INIT_TIMEOUT}" ]; then
|
||||
ARGS="${ARGS} --init-timeout=${TIMEOUT}"
|
||||
fi
|
||||
|
||||
if [ -n "${TIMEOUT}" ]; then
|
||||
ARGS="${ARGS} --timeout=${TIMEOUT}"
|
||||
fi
|
||||
|
||||
if [ -n "${MAX_CONNECTIONS}" ]; then
|
||||
ARGS="${ARGS} --max-connections=${MAX_CONNECTIONS}"
|
||||
fi
|
||||
|
||||
git daemon --base-path=/git ${ARGS}
|
Loading…
Reference in New Issue