Coder Social home page Coder Social logo

flaviostutz / gitlab-runner Goto Github PK

View Code? Open in Web Editor NEW
2.0 2.0 5.0 16 KB

This is an extension of official Gitlab Runner container with auto registration on startup through TOKEN on ENV

License: MIT License

Shell 85.43% Dockerfile 14.57%
gitlab-runner gitlab-ci gitlab-docker ci cd

gitlab-runner's Introduction

gitlab runner

This is an extension of official Gitlab Runner container that uses environment properties to register the container on startup.

Usage

docker-compose.yml

version: '3.5'

services:
  gitlab-runner:
    image: flaviostutz/gitlab-runner
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock
    environment:
      - GITLAB_URL=https://gitlab.com
      - REGISTRATION_TOKEN=[YOUR_TOKEN_HERE]
      - NAME=Testing name with space
      - TAG_LIST=tag-1,tag-2

gitlab-runner's People

Contributors

flaviostutz avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

gitlab-runner's Issues

Add support to `docker-compose` natively

It will be nice to have docker-compose ready on our runner so people could use it effortless.
There are some approach that installs docker-compose in the .gitlab-ci.yml before_script step to so the next steps could use it, but I personally think it is a bit overwhelming and maybe we could provide the runner this capacity natively.
To do so, we just have to change the --docker-image "docker:stable" to use another image that has docker-compose installed. I found this guy that has published this image that could be used: https://hub.docker.com/r/tmaier/docker-compose/
I tested it and worked well...

What do you think?

GITLAB_URL must be `https` instead of `http`

I was stuck here trying to register a runner and receiving the following message:

ERROR: Registering runner... failed                 runner=[RUNNER_TOKEN] status=401 Unauthorized
PANIC: Failed to register this runner. Perhaps you are having network problems 

I tried everything you could imagine, like downgrade the runner version, try to use alpine, bleeding version, and so on.
I also enabled the --debug flag so I could see what was happening, but it cheated me because it prints:

Dialing: tcp gitlab.com:80 ...                     
Dialing: tcp gitlab.com:443 ..

Like if it was redirecting from http to https and solving this problem.

When I changed the URL to https://gitlab.com, the register worked.
So, the docker-compose.yml file should be fixed to have https instead of http

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.