首页 > 编程语言 >[附源码]Python计算机毕业设计SSM基于的楼盘销售系统(程序+LW)

[附源码]Python计算机毕业设计SSM基于的楼盘销售系统(程序+LW)

时间:2022-12-12 17:22:57浏览次数:78  
标签:container Python image access runner 源码 entrypoint 毕业设计 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,Python,image,access,runner,源码,entrypoint,毕业设计,Docker
From: https://www.cnblogs.com/sdfasdf/p/16976624.html

相关文章

  • Python--基本知识认知及应用
    字面量概念:被写下来的固定的值(既包括print里面的值,也包括直接写到编程页面的值)在Python中,常用的有六种值的类型:数字、字符串、列表、元组、集合以及字典;Python中,被双引......
  • 《Python核心编程》第三版 读书笔记
    “一个不成熟男子的标志是为了某种事业英勇地死去,一个成熟男子的标志是为了某种事业卑微地活着。”                       ......
  • 第五天python的基本语法
    python语法之注释不写注释自己会看不懂三种注释的符号方式1:单行注释  #注释内容  方式2:多行注释   '''注释内容'''方式3:多行注释 """注释内容"""pycha......
  • 深度之眼(九)——python函数--面向过程的编程
    文章目录​​4.1函数的定义及调用​​​​4.1.1为什么要调用函数​​​​4.1.2函数的的定义及调用​​​​4.1.3参数传递​​​​4.1.4函数体与变量作用域​​​​4.1.......
  • 深度之眼(十三)——Python:类-面向对象的编程
    文章目录​​引子——类的引入​​​​7.1类的定义​​​​7.1.1类的命名​​​​7.1.2类的属性​​​​7.1.3类的方法​​​​7.2创建实例​​​​7.2.1实例的创建​......
  • 深度之眼(十四)——Python:文件、异常和模块
    文章目录​​零、导读​​​​8.1文件读写​​​​8.1.1文件的打开​​​​8.1.2文件的读取​​​​8.1.3文件的写入​​​​8.1.4既读又写​​​​8.1.5数据的存储与......
  • Map源码注释翻译
    computeIfAbsent() 方法上方注释如果指定的键尚未与值关联(或映射为null),则尝试使用给定的映射函数计算其值,并将其输入到此映射中,除非为null。如果函数返回null,则不记......
  • Python的输出print语句是否会显著降低运行速度?
    先说结论,会,并且运行时间是一般赋值语句的200倍左右,这个知乎回答是我昨天写的,内容是相同的。首先既然是探讨输出是否影响程序运行时间,那肯定就要控制是否输出作为唯一变化......
  • 【PyQt6】Python中QDateTime的常用方法总结
    前置QtDesigner里拖了一个QDateTimeEdit,设置时间格式为“yyyy/MM/ddHH:mm:ss”常用函数dt1=object1.dateTime()#object为QDateTimeEdit对象dt2=object2.dateTi......
  • 数据分析必备工具书:Python官方中文文档
    本文推荐数据分析的必备工具书:Python官方文档,注意,这是一份中文文档!(作者孙强)一、前言今天推荐一下Python官方文档,注意,这是一份中文文档!主题:可以说非常详细了,Python3.7全新变......