1

I have a Gitlab server running on a Docker container: gitlab docker

On Gitlab there is a project with a simple Makefile that runs pdflatex to build pfd file.

On the Docker container I installed texlive and make, I also installed docker runner, command:

curl -sSL https://get.docker.com/ | sh

the .gitlab-ci.yml looks like follow:

.build:
  script: &build_script
  - make

build: 
  stage: test
  tags:
    - Documentation Build
  script: *build

The job is stuck running and a message is shown:

This build is stuck, because the project doesn't have any runners online assigned to it 

any idea?

6
  • It is recommended to run your GITLAB RUNNER outside of Docker, and let Docker download and start the Docker containers. It sounds like you tried to set up the runner yourself? Did you follow the instructions on the docs? docs.gitlab.com/runner/#using-gitlab-runner Commented Nov 28, 2016 at 16:20
  • GITLAB CI RUNNER != GITLAB SERVER. Did you mean to say you ran the main Gitlab Server inside docker, or the CI runner is running inside docker? Or that you didn't realize that the server doesn't CONTAIN any runner and you need to set one up? Commented Nov 28, 2016 at 16:22
  • Obviously not! I run the curl command outside the Docker container containing Gitlab, so i didi it on the host machine. I'm reading now that it is extremely complicated to setup the system as i want, would be much easier with Jenkings... Commented Nov 29, 2016 at 12:50
  • It's not at all clear to me what you want. Can you explain? Feel free to email me at warren dot postma at gmail dot com -- My experience has been the reverse, no matter what you want, it's more work with Jenkins. Commented Nov 29, 2016 at 16:06
  • Hey man thanks! How is not clear? Really easy, I have gitlab in a docker container and want to do CI with it, nothing more than this. Getting email if make command failed and stuff like this... Commented Nov 29, 2016 at 16:25

3 Answers 3

1

The top comment on your link is spot on:

"Gitlab is good, but this container is absolutely bonkers."

Secondly looking at gitlab's own advice you should not be using this container on windows, ever.

If you want to use Gitlab-CI from a Gitlab Server, you should actually be installing a proper Gitlab server instance on a proper Supported Linux VM, with Omnibus, and should not attempt to use this container for a purpose it is manifestly unfit for: real production way to run Gitlab.

Gitlab-omnibus contains:

  1. a persistent (not stateless!) data tier powered by postgres.

  2. a chat server that's entire point in existing is to be a persistent log of your team chat.

  3. not one, but a series of server processes that work together to give you gitlab server functionality and web admin/management frontend, in a design that does not seem ideal to me to be run in production inside docker.

  4. an integrated CI build manager that is itself a Docker container manager. Your docker instance is going to contain a cache of other docker instances.

That this container was built by Gitlab itself is no indication you should actually use it for anything other than as a test/toy or for what Gitlab themselves actually use it for, which is probably to let people spin up Gitlab nightly builds, probably via kubernetes.

Sign up to request clarification or add additional context in comments.

2 Comments

Ok man cool thanks, but I'm not on windows, beside that for me is working pretty good, I love to use docker containers they versatility is wonderful i can run many servers with different purpose on the same machine
The point of a Git server is to contain your code and not lose it. The point of Docker is to built up and tear down stuff easily. Persistence is not the strong point of Docker. Why not back up your hard disk to a Docker container? See my point?
1

I think you're slightly confused here. Judging by this comment:

On the Docker container I installed texlive and make, I also installed docker runner, command:

curl -sSL https://get.docker.com/ | sh

It seems you've installed docker inside docker and not actually installed any runners? This won't work if that's the case. The steps to get this running are:

  • Deploy a new gitlab runner. The quickest way to do this will be to deploy another docker container with the gitlab runner docker image. You can't run a runner inside the docker container you've deployed gitlab in. You'll need to make sure you select an executor (I suggest using the shell executor to get you started) and then you need to register the runner. There is more information about how to do this here. What isn't detailed here is that if you're using docker for gitlab and docker for gitlab-runner, you'll need to link the containers or set up a docker network so they can communicate with each other
  • Once you've deployed and registered the runner with gitlab, you will see it appear in http(s)://your-gitlab-server/admin/runners - from here you'll need to assign it to a project. You can also make it as "Shared" runner which will execute jobs from all projects.
  • Finally, add the .gitlab-ci.yml as you already have, and the build will work as expected.

2 Comments

This is probably a good answer. It's probably the way to fix the issue the guy had. But I think it would be even better to NOT run Gitlab this way except as a test system.
Agreed. I don't like running anything vital in docker though, so i kept the politics out of it :)
0

Maybe you've set the wrong tags like me. Make sure the tag name with your available runner.

tags - Documentation Build # tags is used to select specific Runners from the list of all Runners that are allowed to run this project.

see: https://docs.gitlab.com/ee/ci/yaml/#tags

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.