sameersbn / docker-gitlab-ci-runner

Dockerfile to build a base GitLab CI Runner container image.
MIT License
97 stars 37 forks source link

fix(assets/init): force config.yml symlink to restart existing instances. #4

Closed jperville closed 10 years ago

jperville commented 10 years ago

My runner instances don't survive a clean restart of the host. Docker (with the autostart feature) tries to start the instances but they immediately exit.

root@si-gitlab:~# docker ps -a
CONTAINER ID        IMAGE                               COMMAND               CREATED             STATUS                      PORTS                                   NAMES
81e85e03a30c        sameersbn/gitlab-ci-runner:latest   /app/init app:start   39 minutes ago      Exited (1) 9 minutes ago                                            gitlab-ci-runner-3                

The reason can be found in the log: failed to create symbolic link 'config.yml': File exists (the init script runs with set -e so it will abort at this point).

This tiny PR should fix the problem.

jperville commented 10 years ago

That was fast!

sameersbn commented 10 years ago

LOL.. it was a change that i didn't think required any testing from my side.