Skip to content

Instantly share code, notes, and snippets.

@arthurtsang
Last active September 25, 2019 06:48
Show Gist options
  • Save arthurtsang/9959f4b02386cfda14120b712ab141b4 to your computer and use it in GitHub Desktop.
Save arthurtsang/9959f4b02386cfda14120b712ab141b4 to your computer and use it in GitHub Desktop.
Dockerfile for Git Server
FROM nextflow:19.07.0
# copy nextflow pipeline to /bfx/nextflow
ADD . /bfx/nextflow
# install git (and configure it), nginx, fcgiwrap and apache2-utils
RUN apt-get update && \
apt-get install -y git && \
git config --global user.email "[email protected]" && \
git config --global user.name "company admin" && \
apt-get install -y nginx fcgiwrap apache2-utils && \
cp -f /bfx/nextflow/nginx-default-site /etc/nginx/sites-available/default
# init, add & commit the code
RUN cd /bfx/nextflow && \
git init && \
git update-server-info && \
git add -A && \
git commit -m "checkin"
# /var/www/html/git is the nginx doc location, bare clone the repo and put it there
RUN mkdir -p /var/www/html/git && \
cd /var/www/html/git && \
git clone --bare /bfx/nextflow /var/www/html/git/nextflow.git && \
chown -R www-data:www-data /var/www/html/git && \
chmod -R 755 /var/www/html/git
# copy the run.sh to /root
RUN cp -f /bfx/nextflow/run.sh /root && \
chmod a+x /root/run.sh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment