GithubHelp home page GithubHelp logo

how-to-run-gitlab-in-a-docker-container's Introduction

How-to-run-GitLab-in-a-docker-container

STEP-1: Install and start docker engine

yum install docker

systemctl start docker

systemctl enable docker

systemctl status docker

STEP-2: Pull and run GitLab docker image

docker search gitlab

docker pull docker.io/gitlab/gitlab-ce

docker images

docker run -d --hostname gitlab-sunil.simplylearn.com \
-p 443:443 -p 80:80 -p 2222:22 \
--name gitlab-sunil \
--restart unless-stopped \
--volume /storage/gitlab/config:/etc/gitlab \
--volume /storage/gitlab/logs:/var/log/gitlab \
--volume /storage/gitlab/data:/var/opt/gitlab \
gitlab/gitlab-ce:latest

docker ps

docker logs <48b0bfecd627> -f

STEP-3: Login GitLab and create a new project

URL: http://gitlab-sunil.simplylearn.com>

Create password for Administrator(root)

Login with the updated credentials and create a new project

STEP-4: Work with some git command line

git config --global user.name "Administrator"

git config --global user.email "[email protected]"

git clone http://gitlab-sunil.simplylearn.com/root/my_first_project.git

cd my_first_project

touch README.md

git add README.md

git commit -m "add README"

git push -u origin master

STEP-5: Backup and Restore of GitLab

/usr/bin/docker exec -i gitlab-sunil /opt/gitlab/bin/gitlab-rake \
gitlab:backup:create

crontab -l
	0 7 * * * <COMMAND>

docker exec -it gitlab-sunil ls /var/opt/gitlab/backups/

docker exec -it gitlab-sunil /opt/gitlab/bin/gitlab-rake \
gitlab:backup:restore BACKUP=<1492443013_2019_03_05>

how-to-run-gitlab-in-a-docker-container's People

Contributors

sunilkvasu 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.