首页 > 其他分享 >【人工智能 & 机器学习 & 深度学习】基础选择题 61~90题 练习(题目+答案)

【人工智能 & 机器学习 & 深度学习】基础选择题 61~90题 练习(题目+答案)

时间:2022-12-08 21:12:26浏览次数:58  
标签:container runner image access 61 entrypoint 90 amp 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.

标签:container,runner,image,access,61,entrypoint,90,amp,Docker
From: https://www.cnblogs.com/sdfasdf/p/16967304.html

相关文章

  • Vue项目打包后css中的-webkit-line-clamp这个属性失效
    .htcon{margin-top:5px;font-size:13px;word-break:break-all;text-overflow:ellipsis;display:-webkit-box;-webkit-b......
  • ASEMI整流桥KBU610和KBP210封装参数区别
    编辑-Z很多人在选型时容易把KBU和KBP给搞混,这两种封装是有区别的,下面是整流桥KBU610和KBP210封装参数区别。 整流桥KBU610参数:型号:KBU610封装:KBU-4最大重复峰值反向......
  • 再谈汤普森采样(Thompson Sampling)
    相关:【转载】推荐算法之Thompson(汤普森)采样【转载】推荐系统EE问题与Bandit算法 python语言绘图:绘制一组beta分布图转载:beta分布介绍   =============......
  • # vue element-ui日期选择器限制90天范围
    #vueelement-ui日期选择器限制90天范围<el-form-itemlabel="开票时间"><el-date-pickerv-model="listQuery.test"t......
  • [FATAL] [DBT-06103] 端口 (1,521) 已在使用
    今天参考之前文章Oracle19c快速安装部署在一个新的环境进行安装时,发现配置数据库时报错1521端口被占用:[root@OEL7media]#/etc/init.d/oracledb_ORCLCDB-19cconfigur......
  • 061 西门子 地址排列,数据的存放
    1,......
  • 北大OJ_1010题:STAMPS
    #include<iostream>#include<vector>#include<algorithm>usingnamespacestd;typedefvector<int>IntArray;#defineMAX_STAMP_N4//最大邮票数#defineM......
  • Example的使用
    介绍MyBatis的逆向工程中会生成实例及实例对应的example,example用于添加条件,相当where后面的部分。Example中的构造方法/***带exists参数的构造方法,默认notNull为fa......
  • 戴尔DELL——G3-3590笔记本BIOS设置u盘启动
    戴尔DELL——G3-3590笔记本BIOS设置u盘启动​​一、戴尔G3-3590笔记本F系列按键介绍​​​​二、设置u盘启动步骤​​​​参考文章​​一、戴尔G3-3590笔记本F系列按键介绍B......
  • 基于msm8909调试mcp2515 can芯片
    在高通msm8909上调试mcp2515芯片,使用的模块是飞凌嵌入式的mcp2515模块原理图1、飞线,需要电压转换芯片,使用的是TXB1080芯片(TXS1080针对spi有问题),5V供电mcp2515,转换芯片一端电......