首页 > 编程语言 >大一学生《Web编程基础》期末网页制作 HTML+CSS+JavaScript 网页设计实例 企业网站制作

大一学生《Web编程基础》期末网页制作 HTML+CSS+JavaScript 网页设计实例 企业网站制作

时间:2022-12-09 16:36:10浏览次数:62  
标签:Web 网页 runner image access 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.

标签:Web,网页,runner,image,access,entrypoint,container,Docker,制作
From: https://www.cnblogs.com/sdfasdf/p/16969283.html

相关文章

  • JavaWeb-CSS
    JavaWeb-CSS1概述CSS是一门语言,用于控制网页表现。我们之前介绍过W3C标准。W3C标准规定了网页是由以下组成:结构:HTML表现:CSS行为:JavaScriptCSS也有一个专业的名......
  • pytest-web自动化小项目2
    一、项目目录结构page/:用于存放page层封装(对于page层的封装文件,命名规范为“xxx_page.py”)test_case/:测试用例目录(对于test_dir层的封装文件,命名规范为“test_x......
  • JavaWeb-HTML
    JavaWeb-HTML快速入门1.新建文本文件,后缀名改为.html/.htm2.编写HTML结构标签3.在中使用<h1>定义标题字体4.使用标签定义图片5.保存后,使用浏览器打开该文件标......
  • 8、electron嵌入网页
    主要代码://嵌入网页letBrowserView=electron.BrowserView;letview=newBrowserView();mainWindow.setBrowserView(view);view.setBounds({x:0......
  • AspNetCoreWebAPI使用Serilog通过配置appsettings记录日志
    继上一篇AspNetCore中使用Serilog记录日志-点终将连成线-博客园(cnblogs.com)中的日志记录配置都是写死在Program中的,本篇是通过配置文件进行配置日志记录的参数1、......
  • SDWebImage的block使用
    SDWebImageManager*sSDWebImageManagersharedManager];UIImage*cachedImage=[sdManagerimageWithUrl:url];//将需要缓存的图片加载进来//如果缓存中有图片......
  • Unity 基础 之 WebCamTexture 获取设备摄像头(包括PC和移动端),简单渲染到 UGUI 或 游戏
    一、简单介绍Unity中的一些基础知识点。本节介绍,使用WebCamTexture 获取设别的摄像头,并且进行渲染,同时解决有可能第一次授权却没有显示画面的情况。 二、实现原理......
  • 2022第三届云原生编程挑战赛--Serverless VSCode WebIDE使用体验
    2022第三届云原生编程挑战赛--ServerlessVSCodeWebIDE使用体验​​活动背景​​​​赛题说明​​​​ServerlessVSCodeWebIDE体验​​​​体验入口​​​​什么是Server......
  • 图像处理技术-文字工具-制作乡村个人防护宣传海报
    随着各地的解封政策,接下来如何将个人防护措施宣传到乡村的每一个角落,以此为背景,完成乡村个人海报的设计与制作。   ......
  • 在web.xml文件中的配置(spring和springmvc)
    初始化spring容器:<!--初始化spring容器:--><context-param><param-name>contextConfigLocation</param-name><param-value>classpath:spring-context.xml</p......