首页 > 编程语言 >java-net-php-python-s2s酒店管理系统计算机毕业设计程序

java-net-php-python-s2s酒店管理系统计算机毕业设计程序

时间:2022-12-08 10:56:04浏览次数:70  
标签: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/16965471.html

相关文章

  • Python中glob类的使用
    OverridetheentrypointofanimageIntroducedinGitLabandGitLabRunner9.4.Readmoreaboutthe extendedconfigurationoptions.Beforeexplainingtheav......
  • 《悟透javascript》学习笔记:四、函数的魔力
    引言 JavaScript的代码就只有function一种形式,function就是函数的类型。也许其他编程语言还有procedure或method等代码概念,但在JavaScript里只有function一种形......
  • 10、java反射机制
    1、 什么是反射机制正常情况下,我们通过类来创建对象。如果反过来,我们要通过一个对象来找到对应的类,怎么办,这时就要用到反射机制。  2、 java.lang.Class类a)    ......
  • 再读《悟透javascript》之四、贪吃蛇
    前言     贪吃蛇是个很简单的小游戏,但是却很有趣,下面是我用JavaScript写的一个贪吃蛇的代码:  代码如下:   <htmlxmlns="http://www.w3.org/1999/xhtml"><headr......
  • 《悟透javascript》学习笔记:一、前言
    《悟透JavaScript》学习笔记  这是一本很形象生动的书,使我们可以更深地了解了JavaScript。 引言   编程世界里只存在两种基本元素,一个是数据,一个是代码。编程世界就......
  • 《悟透javascript》学习笔记:二、回归简单
    引言 要理解JavaScript,你得首先放下对象和类的概念,回到数据和代码的本原。前面说过,编程世界只有数据和代码两种基本元素,而这两种元素又有着纠缠不清的关系。JavaScript就......
  • 9、java类集
    类集是java中极其重要的是一个特性 常用集合接口1、 Collection接口,集合接口,用来存储一组对象,基于此接口又扩展了List(允许重复)、Set(不允许重复)等接口2、 Map接口,键值对......
  • 《悟透javascript》学习笔记:三、似类却不是类
    引言 JavaScript没有“类”的概念!这让很多学习过高级语言的人感到很不爽,其实比之于C语言又如何呢?显然JavaScript要比C语言好用很多。 不废话,上代码 <scriptlanguage="j......
  • 再读《悟透javascript》之三、甘露模型
    前言     甘露模型是用于开发基于javascript的类库的,通过它,我们可以以类似C#等面向对象的语言式的模式来开发javascript类库,这将使你的javascript代码变得清晰有条理......
  • Python3 多线程并发处理的返回值收集
    库函数threading背景去查询python3多线程,可以找到一大堆关于threading库的博客教程,但是多数是几个线程执行同一个函数(他们博客里各个线程传入的函数参数不同),且没有......