I was struggling for hours in order to have a full gitlab ci/cd-> docker-compose runner configuration up and running with no luck till now.
At a certain point it was clear to me that i needed to configure a dind service for my docker runner but i was unable to make it work correctly.
Now i ran you… Answer from A77ILA on forum.gitlab.com
GitLab
forum.gitlab.com › gitlab ci/cd
Example GitLab Runner docker compose configuration - GitLab CI/CD - GitLab Forum
March 26, 2022 - After having spent some time the other day to redo my (“standalone”) runner setup, I figured that I would share this for the benefit of the community. .env: RUNNER_NAME=RUNNER-NAME REGISTRATION_TOKEN=TOKEN CI_SERVER_URL=https://gitlab.com/ docker-compose.yml: version: "3.5" services: dind: image: docker:20-dind restart: always privileged: true environment: DOCKER_TLS_CERTDIR: "" command: - --storage-driver=overlay2 runner: restart: always image:...
Gitlab Runner can execute jobs with specified docker-compose files in series, but not concurrently (Solved, it totally can)
The question: We’re trying to become more modern with our CI/CD, and as part of that, I’ve recently re-worked the testing for one of our applications to use docker compose; It’s a ruby app with a test suite that takes about 15 minutes to run, and sometimes if Selenium is having a sleepy ... More on forum.gitlab.com
How to use docker-compose.yml file in GitLab Runner server?
Hello, I would be grateful if someone could clarify something for me. I have two servers: GitLab Server: Repositories GitLab Runner: Runner + Docker On my GitLab server I have created a project with some code. In the root directory of my project, I have placed two files, .gitlab-ci.yml and ... More on forum.gitlab.com
How to connect a gitlab-runner with a gitlab service via docker-compose?
Describe your question in as much detail as possible: I have the following docker-compose file: version: "3.8" services: gitlab: image: gitlab/gitlab-ce:16.2.3-ce.0 container_name: gitlab hostname: 'gitlab' environment: GITLAB_OMNIBUS_CONFIG: | external_url 'http://gitlab' ports: - '80:80' ... More on forum.gitlab.com
Use gitlab-runner with docker-compose
Why would your docker-compose.yml not be in the repo?! At the same time, I don’t know if having the gitlab runner launch services in this way is a great idea. You’re mixing deployment and build. More on reddit.com
28:57
🚀 GitLab Docker Compose | Register GitLab Runner using Docker ...
How to Configure GitLab Runner with Docker Executor | Day 6 - YouTube
16:04
Run Your Local GitLab Server in Docker Container using Docker Compose ...
13:12
GitLab CI/CD - Установка своего DOCKER GitLab Runner ...
11:01
Register Docker Runner/Executor with GitLab Server to Run Pipelines ...
30:38
🚀 Day 01 - GitLab Docker Compose | Install GitLab in a Docker ...
Medium
medium.com › @BuildWithLal › dockerized-gitlab-ci-setting-up-and-connecting-your-gitlab-runner-b810a02e42f2
Dockerized GitLab CI: Setting Up and Connecting Your GitLab Runner | by Lal Zada | Medium
October 10, 2024 - Continuing the series of Dockerized ... a GitLab runner with your GitLab server for running your project pipelines to build, test and deploy your project. In the first post, we set up a GitLab server using barebone docker commands. In the next post, we transitioned those barebone docker commands into a docker compose file for better ...
GitLab
forum.gitlab.com › gitlab ci/cd
Gitlab Runner can execute jobs with specified docker-compose files in series, but not concurrently (Solved, it totally can) - GitLab CI/CD - GitLab Forum
November 14, 2023 - The question: We’re trying to become more modern with our CI/CD, and as part of that, I’ve recently re-worked the testing for one of our applications to use docker compose; It’s a ruby app with a test suite that takes about 15 minutes to run, and sometimes if Selenium is having a sleepy ...
GitLab
forum.gitlab.com › gitlab ci/cd
How to use docker-compose.yml file in GitLab Runner server? - GitLab CI/CD - GitLab Forum
April 22, 2024 - Hello, I would be grateful if someone could clarify something for me. I have two servers: GitLab Server: Repositories GitLab Runner: Runner + Docker On my GitLab server I have created a project with some code. In the root directory of my project, I have placed two files, .gitlab-ci.yml and ...
DEV Community
dev.to › boiledsteak › how-to-set-up-on-prem-gitlab-vcs-gitlab-cicd-gitlab-runner-with-docker-3b5c
How to set up on-prem Gitlab VCS, Gitlab CI/CD, Gitlab Runner, with Docker - DEV Community
November 15, 2023 - Next, in a separate directory, create another docker-compose.yml · version: '3.6' services: gitlab-runner: container_name: gitlab-runner restart: always stdin_open: true tty: true command: register volumes: - '/srv/gitlab-runner/config:/etc/gitlab-runner' - '/var/run/docker.sock:/var/run/docker.sock' image: 'gitlab/gitlab-runner:latest' ports: - '81:80' - '8094:8093'
TestDriven.io
testdriven.io › blog › gitlab-ci-docker
Deploying Self-Hosted GitLab CI Runners with Docker | TestDriven.io
October 29, 2021 - $ docker-compose exec gitlab-runner-container \ gitlab-runner register \ --non-interactive \ --url <YOUR-GITLAB-URL> \ --registration-token <YOUR-GITLAB-REGISTRATION-TOKEN> \ --executor docker \ --description "Sample Runner 1" \ --docker-image "docker:stable" \ --docker-volumes /var/run/docker.sock:/var/run/docker.sock
GitLab
docs.gitlab.com › gitlab docs › install › install gitlab runner › docker
Run GitLab Runner in a container | GitLab Docs
To use your local system for the configuration volume and other resources mounted into the gitlab-runner container: Optional. In MacOS systems, /srv does not exist by default. Create /private/srv, or another private directory, for setup. ... docker run -d --name gitlab-runner --restart always \ -v /srv/gitlab-runner/config:/etc/gitlab-runner \ -v /var/run/docker.sock:/var/run/docker.sock \ gitlab/gitlab-runner:latest
GitLab
forum.gitlab.com › gitlab ci/cd
How to connect a gitlab-runner with a gitlab service via docker-compose? - GitLab CI/CD - GitLab Forum
August 11, 2023 - Describe your question in as much detail as possible: I have the following docker-compose file: version: "3.8" services: gitlab: image: gitlab/gitlab-ce:16.2.3-ce.0 container_name: gitlab hostname: 'gitlab' environment: GITLAB_OMNIBUS_CONFIG: | external_url 'http://gitlab' ports: - '80:80' - '443:443' - '22:22' volumes: - gitlab_config:/etc/gitlab - gitlab_logs:/var/log/gitlab - gitlab_data:/var/opt/gitlab networ...
Starred by 4 users
Forked by 4 users
Languages: Shell
Medium
medium.com › @BuildWithLal › dockerized-gitlab-ci-register-docker-executor-as-a-gitlab-runner-71799352c9ac
Dockerized GitLab CI: Register Docker Executor as a GitLab Runner | by Lal Zada | Medium
October 10, 2024 - In this post, we are going to register docker executor inside our GitLab runner service so we can build, test and deploy our dockerized projects. Before registering our docker executor, we need a minor update in our docker-compose.yml file by mounting the docker.sock file from our host machine into the GitLab runner container.
JamesCoyle.net
jamescoyle.net › home › docker compose yml for gitlab and gitlab runner
Docker Compose yml for Gitlab and Gitlab Runner | JamesCoyle.net Limited
November 1, 2019 - version: '3.5' services: gitlab: image: gitlab/gitlab-ce:latest hostname: www.jamescoyle.net restart: unless-stopped environment: GITLAB_OMNIBUS_CONFIG: | gitlab_rails['gitlab_shell_ssh_port'] = 8822 ports: - "8000:80" - "8822:22" volumes: - ./config/gitlab:/etc/gitlab - ./data/gitlab:/var/opt/gitlab - ./logs:/var/log/gitlab networks: - gitlab gitlab-runner: image: gitlab/gitlab-runner:alpine restart: unless-stopped depends_on: - gitlab volumes: - ./config/gitlab-runner:/etc/gitlab-runner - /var/run/docker.sock:/var/run/docker.sock networks: - gitlab networks: gitlab: Create a new directory and save the above file inside it as docker-compose.yml.
GitLab
docs.gitlab.com › gitlab docs › use gitlab › use ci/cd to build your application › jobs › docker › use docker to build docker images
Use Docker to build Docker images | GitLab Docs
May 8, 2023 - On the server where GitLab Runner is installed, install Docker Engine. View a list of supported platforms. ... default: before_script: - docker info build_image: script: - docker build -t my-docker-image . - docker run my-docker-image /script/to/run/tests · You can now use docker commands (and install Docker Compose if needed).
Reddit
reddit.com › r/gitlab › use gitlab-runner with docker-compose
r/gitlab on Reddit: Use gitlab-runner with docker-compose
April 14, 2020 -
I’ve just started using gitlab runners, and I’m stuck in a point related to running docker-compose.
I don’t know if my approach ie correct, but I have a docker-compose file that runs multiple docker images on my system, and I want the gitlab runner to pull the code and run the docker-compose.yml file on the host once I push my changes to the repo.
The docker-compose.yml file is not included in the repo. I think that might be the problem, if it is, is there anyway to make the runner use the host’s docker-compose that is already running?
Thank you in advance.
Top answer 1 of 3
2
Why would your docker-compose.yml not be in the repo?! At the same time, I don’t know if having the gitlab runner launch services in this way is a great idea. You’re mixing deployment and build.
2 of 3
2
I don't know if this helps but for sensitive env variables you could you gitlab's variables. In repo go settings -> ci/cd -> variables. Also gitlab runners are just docker containers and you can run basic bash scripts inside of them and mount volumes to them. I think there is one problem you have: you don't trust the docker-compose to gitlab but you still want to run gitlab runner. In that case I would just create my custom runner(search for 'docker in docker' concept, it's the same that gitlab runners use). Hopefully that helps somehow and my info is correct.