首页 > 其他分享 >【Matplotlib绘制图像大全】(十二):嵌套饼图

【Matplotlib绘制图像大全】(十二):嵌套饼图

时间:2022-12-08 23:55:49浏览次数:63  
标签:container runner image Matplotlib access 嵌套 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,runner,image,Matplotlib,access,嵌套,entrypoint,Docker,大全
From: https://www.cnblogs.com/sdfasdf/p/16967765.html

相关文章

  • Git命令大全【杭州多测师_王sir】【杭州多测师】
    1. 初始化项目git init2. 建立本地仓库和远程仓库的连接git remote add origin 远程仓库地址3. 已有项目只需克隆项目到本地,无需进行前两步git clone 远程仓库地......
  • 《道德经》生僻字注音大全,收藏熟记
    第一章原文:故常无欲以观其妙,常有欲以观其徼(jiào)。解释:所以常从无中,去观察道的奥妙。常从有中,去观察道的运行。第五章原文:天地不仁,以万物为刍(chú)狗。解释:天地无......
  • JavaScript入门⑧-事件总结大全
    JavaScript入门系列目录JavaScript入门①-基础知识筑基JavaScript入门②-函数(1)基础{浅出}JavaScript入门③-函数(2)原理{深入}执行上下文JavaScript入门④-万物皆......
  • 收藏:产品经理和技术经理等的OKR模板大全
    技术研发篇OKR:​​​https://worktile.com/blog/okr/okr-template-02-dev​​​产品经理篇OKR:​​https://worktile.com/blog/okr/okr-template-01-product-and-design​......
  • 浅谈“配置化”与 normalize 在复杂嵌套组件开发中的应用
    简介视图层相比脚本,具有不便于调试、无效信息过多(与当前逻辑不相关的属性)等特点,因此,同样的逻辑位于视图可能比位于脚本中的复杂程度更高。因此,在开发复杂组件,尤其是嵌套......
  • spring boot中Excel文件下载踩坑大全
    项目场景:Springboot文件下载调用接口下载springboot工程的resources目录下的excel模板文件,非常常见的一个文件下载功能,但是却容易遇到很多坑,下面总结记录下。问题一:下载的......
  • Python——问题解决:matplotlib.pyplot绘制函数中文乱码
    代码frompylabimportmpl#中文库mpl.rcParams['font.sans-serif']=['SimHei']mpl.rcParams['axes.unicode_minus']=False例子plt.title("三次样条插值11点")plt.pl......
  • vue 多级嵌套路由,页面不变化问题解决
      component:{render(c){returnc('router-view')}},redirect:'/set/origin',在二级路由出添加上面的代码,并重定向二级路由页面就可以了......
  • JavaScript入门⑦-DOM操作大全
    JavaScript入门系列目录JavaScript入门①-基础知识筑基JavaScript入门②-函数(1)基础{浅出}JavaScript入门③-函数(2)原理{深入}执行上下文JavaScript入门④-万物皆......
  • (转)MySQL常用系统表大全
    原文:https://blog.csdn.net/xlxxcc/article/details/51754524?spm=1001.2101.3001.6650.1&utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7ECTRLIST%7ERa......