Giter VIP home page Giter VIP logo

docker-gitolite's Introduction

#Gitolite on docker

How to run

There are two methods to run this image.

  1. Use docker run directly. Example:

     $ docker run -d -p 2222:22 --name gitolite -e SSH_KEY="$(cat  ~/.ssh/id_rsa.pub)"  -v /path/to/git/data:/home/git/repositories  betacz/gitolite
    
  2. Use the gitolite script from the GitHub Project.

    This script contains the following variables. You can change them by modifying this file or by use the environment variable to override.

     IMAGE_NAME			default: "betacz/gitolite"
     CONTAINER_NAME  	default: "gitolite-server"
     PORT                default: "2222"
     GIT_DATA_PATH       default: "/opt/git"
     SSH_KEY_FILE        default: "$HOME/.ssh/id_rsa.pub"
    

    Example:

     # run the container
     $ GIT_DATA_PATH=/var/data/git ./gitolite start
     # stop && remove the container
     $ ./gitolite stop && ./gitolite remove
    

    The user running the script must be a member of the group docker. Otherwise, you need to modify this script and prepend sudo to the appropriate command.

Attention:

  • If you don't use your own ssh key, you can get the built-in private key by docker logs gitolite for admin user.

  • You should create a directory for persistent Git repositories. This directory must have read/write permissions for current user.

  • The Git repositories directory you specify can also be a already exists gitolite repositories.

.rc file

You can customize the gitolite .rc file by modify the /path/to/git/data/gitolite.rc. This file will sync to ~/.gitolite.rc when restart the container. So after change it you must run command like this:

   $ ./gitolite stop && ./gitolite start

Container removed?

If the container accidentally removed by docker rm or ./gitolite remove . You can start it with the command as same as before. But you must force push the gitolite-admin again.

Example:

   $ GIT_DATA_PATH=/var/data/git ./gitolite start
   $ cd ~/gitolite-admin && git push -f

Build your own image

Clone the source code and run:

   $ docker build -t gitolite .

docker-gitolite's People

Contributors

hlj avatar jesselang avatar larskluge avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.