首页 > 其他分享 >Paddle 点灯人 之 Paddle介绍

Paddle 点灯人 之 Paddle介绍

时间:2022-12-09 17:55:47浏览次数:80  
标签:点灯 runner image 介绍 access private entrypoint Paddle Docker

Override the entrypoint of an image

Introduced in GitLab and GitLab Runner 9.4. Read more about the extended configuration options.

Before explaining the available entrypoint override methods, let’s describe how the runner starts. It uses a Docker image for the containers used in the CI/CD jobs:

  1. The runner starts a Docker container using the defined entrypoint. The default from Dockerfile that may be overridden in the .gitlab-ci.yml file.
  2. The runner attaches itself to a running container.
  3. The runner prepares a script (the combination of before_scriptscript, and after_script).
  4. The runner sends the script to the container’s shell stdin and receives the output.

To override the entrypoint of a Docker image, define an empty entrypoint in the .gitlab-ci.yml file, so the runner does not start a useless shell layer. However, that does not work for all Docker versions.

  • For Docker 17.06 and later, the entrypoint can be set to an empty value.
  • For Docker 17.03 and earlier, the entrypoint can be set to /bin/sh -c/bin/bash -c, or an equivalent shell available in the image.

The syntax of image:entrypoint is similar to Dockerfile’s ENTRYPOINT.

Let’s assume you have a super/sql:experimental image with a SQL database in it. You want to use it as a base image for your job because you want to execute some tests with this database binary. Let’s also assume that this image is configured with /usr/bin/super-sql run as an entrypoint. When the container starts without additional options, it runs the database’s process. The runner expects that the image has no entrypoint or that the entrypoint is prepared to start a shell command.

With the extended Docker configuration options, instead of:

  • Creating your own image based on super/sql:experimental.
  • Setting the ENTRYPOINT to a shell.
  • Using the new image in your CI job.

You can now define an entrypoint in the .gitlab-ci.yml file.

For Docker 17.06 and later:

image:
  name: super/sql:experimental
  entrypoint: [""]

For Docker 17.03 and earlier:

image:
  name: super/sql:experimental
  entrypoint: ["/bin/sh", "-c"]

Define image and services in config.toml

Look for the [runners.docker] section:

[runners.docker]
  image = "ruby:latest"
  services = ["mysql:latest", "postgres:latest"]

The image and services defined this way are added to all jobs run by that runner.

Access an image from a private Container Registry

To access private container registries, the GitLab Runner process can use:

To define which option should be used, the runner process reads the configuration in this order:

  • DOCKER_AUTH_CONFIG CI/CD variable.
  • DOCKER_AUTH_CONFIG environment variable set in the runner’s config.toml file.
  • config.json file in $HOME/.docker directory of the user running the process. If the --user flag is provided to run the child processes as unprivileged user, the home directory of the main runner process user is used.

Requirements and limitations

  • Available for Kubernetes executor in GitLab Runner 13.1 and later.
  • Credentials Store and Credential Helpers require binaries to be added to the GitLab Runner $PATH, and require access to do so. Therefore, these features are not available on shared runners, or any other runner where the user does not have access to the environment where the runner is installed.

Use statically-defined credentials

There are two approaches that you can take to access a private registry. Both require setting the CI/CD variable DOCKER_AUTH_CONFIG with appropriate authentication information.

  1. Per-job: To configure one job to access a private registry, add DOCKER_AUTH_CONFIG as a CI/CD variable.
  2. Per-runner: To configure a runner so all its jobs can access a private registry, add DOCKER_AUTH_CONFIG as an environment variable in the runner’s configuration.

标签:点灯,runner,image,介绍,access,private,entrypoint,Paddle,Docker
From: https://www.cnblogs.com/sdfasdf/p/16969629.html

相关文章

  • UIAutomator测试框架介绍
    uiautomator简介UiAutomator是Google提供的用来做安卓自动化测试的一个Java库,基于Accessibility服务。功能很强,可以对第三方App进行测试,获取屏幕上任意一个APP的任意一个......
  • 【译】Desmond命令行介绍
    本手册描述了在Schrödinger环境中通过命令行使用Desmond的情况:使用Schrödinger作业控制设施运行作业所需的程序、实用程序和文件。Desmond后端在执行作业时使用其他文件......
  • Vert.X 介绍
    Vert.X简介Vert.X是一个基于JVM的响应式应用/工具包(Reactiveapplications)。Vert.X是事件驱动,非阻塞纯异步IO:极少线程资源处理大量并发请求,高并发系统的优选官网上V......
  • Delfoi ARC机器人离线编程软件特点介绍丨衡祖仿
    DelfoiARC根据选定的参数和特征,程序可以有效地利用3DCAD模型和软件内部WPS(焊接工艺规范)数据库的特征。无论机器人品牌如何,通用软件都能创建准确、无差错、同质且高质量的......
  • [python]Anaconda介绍、安装及使用
    一、什么是Anaconda?简介Anaconda(​​官方网站​​)就是可以便捷获取包且对包能够进行管理,同时对环境可以统一管理的发行版本。Anaconda包含了conda、Python在内的超过180个科......
  • vue组件介绍及应用
    一个.vue文件就是一个组件组件都是由三部分组成:html结构(html结构都是在template标签中)、js逻辑、css样式1)template只能解析一个根标签2)js逻辑都是在script标签中,必须设......
  • NLP_learning 中文基本任务与处理(分词、停用词、词性标注、语句依存分析、关键词抽取
    OverridetheentrypointofanimageIntroducedinGitLabandGitLabRunner9.4.Readmoreaboutthe extendedconfigurationoptions.Beforeexplainingtheav......
  • 12_7数据库介绍
    数据库含义:存储和管理数据的仓库,用户可以进行增删改查等操作本质:一款基于网络通信的应用程序分类:关系型数据库:数据之间彼此有关系或约束,通常以表格形式存储,存......
  • 计算机语言的简单介绍
    计算机语言的发展计算机语言是从低级语言到汇编语言再到高级语言这样的一个发展过程。计算机只认识0,1这种二进制数,但是对于人类而言,看懂并且精通二进制是一件非常令人痛......
  • Tiflash的使用介绍
    1、创建一个products表mysql>CREATETABLEproducts(->idINTPRIMARYKEYAUTO_INCREMENT,->product_nameVARCHAR(100),->priceDEC......