首页 > 编程语言 >JavaScript -- DOM事件总结

JavaScript -- DOM事件总结

时间:2022-12-09 19:44:46浏览次数:67  
标签:container DOM -- image JavaScript 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,DOM,--,image,JavaScript,access,runner,entrypoint,Docker
From: https://www.cnblogs.com/sdfasdf/p/16969805.html

相关文章

  • JavaScript:立即执行函数
    想象一下,如果我希望某个代码块,只执行一次,就不再执行,应该怎么办?代码块肯定是用函数来表示,执行肯定是调用函数,但是确保只执行一次,该怎么办?我们为什么可以多次调用函数,因为......
  • JavaSE复习day5
    JavaSE复习day5胡家伟16.equals&toString&编写编译运行equals概念equals是在object类中的方法,在object中equals是用来检查两个参数是否引用的是同一个对象obj.equals......
  • openssl实现非对称加解密
    使用openssl实现非对称加、解密:一、生成密钥,该密钥使用des3加密opensslgenrsa-outprivate.key-des32048二、生成对应公钥opensslrsa-inprivate.key-pubout-......
  • strcpy和memset的引用
    intmain(){ chararr1[]="hello"; chararr2[20]="#########"; //arr2[]copy时把arr1[]里的结束\0也复制过来了,所以打印遇到\0结束打印 strcpy(arr2,arr1); memset(ar......
  • C#通过不安全代码看内存加载
    (注:本篇用点长,有点绕,耐心浏览)C#中类型分为值类型和引用类型,值类型存储在堆栈中,是栈结构,先进后出,引用类型存储在托管堆中。接下来用不安全代码的地址,来看一下值类型和引......
  • ftp下载显示进度
    经常用到ftpget命令下载东西,但是遇到大的文件不知道是挂了还是在运行,要是能显示就好了,于是就有了下文。。。 注:红色 字体是我敲击的命令“#”是注释语 [root@lo......
  • ReferenceError和TypeError的区别
    ReferenceError:----指在RHS查询中所有嵌套的作用于中遍寻不到所需的变量,引擎就会抛出ReferenceError异常。ReferenceError同作用域判别失败相关,而TypeError这代表作用域......
  • 使用 SSH 连接 Git 服务器
    关于SSHSSH(SecureShell)是一种安全的远程登录协议,可以让你通过安全的加密连接进行远程登录。目前,Mac、Windows10、Linux系统均有内置OpenSSH客户端。如果你想通......
  • 从 ftp 上下载文件、文件夹
    下载子文件夹:wget-r-nH--cut-dir=1ftp://ip/folder_name/ 下载压缩文件:wgetftp://ip/folder_name/folder_name/xxxxxx.tgz直接下载压缩文件(tar-xfxxxx.tg)-......
  • qt msvc 静态库编译
    记录命令行编译过程:在下载的qtmsvcsource文件中拉起vsx86nativetoolscommand,输入configure-confirm-license-opensource-static-static-runtime-debug-an......