Skip to content
Snippets Groups Projects

Docker Wrapper to interact with gitlab

  • Clone with SSH
  • Clone with HTTPS
  • Embed
  • Share
    The snippet can be accessed without any authentication.
    Authored by Kaatz, Christian

    A docker container setup to work with git

    Files to work with git

    contents of docker-compose-initial.yml

    version: "2.2"
    services:
      git:
        image: alpine/git:latest
        volumes:
          - "./repo:/git"
        env_file:
          - ./git.env
    

    contents of docker-compose.yml

    version: "2.2"
    services:
      git:
        image: alpine/git:latest
        volumes:
          - "./repo/streaming:/git"    
        env_file:
          - ./git.env
    

    contents of git-env

    GIT_AUTHOR_EMAIL="name@beuth-hochschule.de"
    GIT_AUTHOR_NAME="Your Name"
    GIT_COMMITTER_EMAIL="name@beuth-hochschule.de"
    GIT_COMMITTER_NAME="Your Name"
    Edited
    snippetfile1.txt 613 B
    • if thise message occurs: ! [rejected] master -> master (fetch first)

      docker-compose run git pull --rebase

    0% Loading or .
    You are about to add 0 people to the discussion. Proceed with caution.
    Please register or to comment