首页 > 编程语言 >java-net-php-python-sceatch在线学习系统2019演示录像计算机毕业设计程序

java-net-php-python-sceatch在线学习系统2019演示录像计算机毕业设计程序

时间:2022-12-08 11:22:54浏览次数:63  
标签:java python image access runner entrypoint 毕业设计 container 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.

标签:java,python,image,access,runner,entrypoint,毕业设计,container,Docker
From: https://www.cnblogs.com/sdfasdf/p/16965591.html

相关文章

  • Can‘t find Python executable “python“, you can set the PYTHON env variable
    项目install时报错,卸载掉node-saas,单独安装saas,再install就可以了。npmuninstallnode-sassnpminstallsaas-inpminstall......
  • 四、程咬金——JavaScript基础
     一、前言Ajax,异步JavaScript和XML,前面已经解释过,所以Ajax的学习还包含JavaScript和XML,这里我们先看JavaScript,而JavaScript实际上又是包含JavaScript语法和HTMLDOM即文档......
  • 《悟透javascript》学习笔记
    《悟透javascript》学习笔记 一、         前言 二、         回归简单、基本类型 三、         表演、似类却不是类 四、      ......
  • 《悟透javascript》学习笔记:X、深入继承
    引言      JavaScript不是按面向对象的思想设计的程序语言,所以它不具备像现有的面向对象的语言那样的功能,但是面向对象的思想是如此的深入人心,以至于JavaScript也削......
  • 再读《悟透javascript》之五、五子棋
    前言     五子棋是个很有趣的游戏,在用javascript开发之后,我发现其实ai算法才是最难的,这里的ai算法是直接借鉴自其它的ai算法。  代码如下:<htmlxmlns="http://www.w3......
  • java爬虫笔记:使用WebCollector增量采集www.baiduyunsousou.com
    WebCollector可以配置短点爬取,历史数据根据Key去重,也就是url 最近在采集百度云网盘,记录一下 /***@authorLiu*@create2022-08-0211:48*/@Component@Slf......
  • 极客编程python入门-sorted函数使用
    排序算法Python内置的sorted()函数就可以对list进行排序:>>>sorted([36,5,-12,9,-21])[-21,-12,5,9,36]sorted()函数也是一个高阶函数,它还可以接收一个key函数来实......
  • python初步了解链表
    python数据结构——链表链表由一个个节点组成,每个节点包含自己的存储数据和下一个节点。单链表简单实现先创造一个类来表示节点与节点之间的关系classNode:def......
  • java for执行顺序
     for(intj=0;j<size;j++){//执行todo} 第一步:j=0;j<size;第二步: todo第三步: j++ ;j<size;第四步:todo 第五步:j++ ;j<size;第六步:todo每一步......
  • python初步了解栈
    python初步了解栈栈栈是一种后入先出的数据结构。python用列表实现堆栈非常容易,使用append函数,即可实现堆栈,pop()函数即可实现从栈顶取出元素。stack=[3,4,5]stac......