Answers for "install docke on a gitlab runner"

1

how to enable gitlab runner to use local docker images

open the file config.toml in /etc/gitlab-runner using sudo
and add the follwoing line to the docker runner
pull_policy = "if-not-present"

Below is an example of config.toml I have on my machine 
$ sudo vi /etc/gitlab-runner/config.toml

concurrent = 1
check_interval = 0

[session_server]
  session_timeout = 1800

[[runners]]
  name = "docker_dd_online"
  url = "https://gitlab.com/"
  token = "**********"
  executor = "docker"
  [runners.custom_build_dir]
  [runners.cache]
    [runners.cache.s3]
    [runners.cache.gcs]
    [runners.cache.azure]
  [runners.docker]
    tls_verify = false
    image = "local_docker_image:latest"
    privileged = false
    disable_entrypoint_overwrite = false
    oom_kill_disable = false
    disable_cache = false
    volumes = ["/cache"]
    shm_size = 0
    pull_policy = "if-not-present"
Posted by: Guest on August-22-2021
0

Gitlab docker installation

sudo docker run --detach 
  --hostname yourhostname.com 
  --publish 443:443 --publish 80:80 --publish 222:22 
  --name gitlab 
  --restart always 
  --volume /srv/gitlab/config:/etc/gitlab 
  --volume /srv/gitlab/logs:/var/log/gitlab 
  --volume /srv/gitlab/data:/var/opt/gitlab 
  gitlab/gitlab-ce:latest
Posted by: Guest on May-08-2021

Code answers related to "Shell/Bash"

Browse Popular Code Answers by Language