📌  相关文章
📜  如何让 gitlab runner 使用本地 docker 镜像 - Shell-Bash 代码示例

📅  最后修改于: 2022-03-11 14:51:01.441000             🧑  作者: Mango

代码示例1
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"