GitLab

GitLab

GitLab is a web-based platform for version control and collaborative software development. It provides tools for tracking changes in source code, managing software projects, and facilitating collaboration among developers, enabling teams to efficiently work on code, automate workflows, and streamline the software development process.

This will run Gitlab and Gitlab runner under http://localhost:[port] inside your network

# docker-compose.yml
version: '3.7'
services:
  web:
    image: 'gitlab/gitlab-ce:latest'
    restart: always
    hostname: 'localhost'
    container_name: gitlab-ce
    environment:
      GITLAB_OMNIBUS_CONFIG: |
        external_url 'http://localhost'
    ports:
      - '[http_port]:80'
      - '[https_port]:443'
    volumes:
      - '/home/[user]/docker/gitlab/config:/etc/gitlab'
      - '/home/[user]/docker/gitlab/logs:/var/log/gitlab'
      - '/home/[user]/docker/gitlab/data:/var/opt/gitlab'
    networks:
      - gitlab
  gitlab-runner:
    image: gitlab/gitlab-runner:alpine
    container_name: gitlab-runner
    restart: always
    depends_on:
      - web
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock
      - '/home/[user]/docker/gitlab/gitlab-runner:/etc/gitlab-runner'
    networks:
      - gitlab

networks:
  gitlab:
    name: gitlab-network

Copy

NOTE:
[user] Corresponds to the folder of your user in your system
[http_port] The desired http port you'd like to map the host
[https_port] The desired https port you'd like to map the host

After installing, inspect the container and type: gitlab-rake "gitlab:password:reset[root]" this will reset the password of the root user
Then you can access your instalation and login with the user: root and the password that you've set before