首页 > 其他分享 >【轻量级开源ROS 的机器人设备(5)】--(2)拟议的框架——µROS节点

【轻量级开源ROS 的机器人设备(5)】--(2)拟议的框架——µROS节点

时间:2022-12-18 15:55:25浏览次数:68  
标签:container -- image access runner entrypoint Docker ROS 轻量级

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,--,image,access,runner,entrypoint,Docker,ROS,轻量级
From: https://www.cnblogs.com/sdfasdf/p/16990472.html

相关文章

  • 内部类
    内部类一、基本概念基本介绍:一个类的内部又完整的嵌套了另一个类结构。被嵌套的类称为内部类(innerclass),嵌套其他类的类称为外部类(outerclass)。是我们类的第五大成员......
  • .net core mvc中session的应用
    1、首先新建一个空的web项目,在Program.cs中打开和使用sessionpublicclassProgram{publicstaticvoidMain(string[]args){var......
  • 漏洞复现-hxpctf2020
    hxpCTF2020做kernel利用讲解。主要易受攻击模块是hackme.ko。分析内核模块:Hackme_init()它注册一个名为hackme的设备驱动文件Hackme_read()设备驱动的read操作H......
  • 漏洞实战部分2-安卓应用ZipEntry对象问题实战
    安卓应用漏洞学习本节课介绍ZipEntry对象,这个对象常用于解压压缩包操作。//ThisclassisusedtorepresentaZIPfileentry.//Author://DavidConnellypubliccla......
  • 这个大力神杯,梅西已足足等了16年,AI预测:阿根廷冠军
    OverridetheentrypointofanimageIntroducedinGitLabandGitLabRunner9.4.Readmoreaboutthe extendedconfigurationoptions.Beforeexplainingtheav......
  • Python-提取地形起伏度最佳分析窗口
    地形起伏度是指在一定区域范围内的最大高程与最小高程之差.反映在DEM上,就是指分析区域内,栅格最大值与最小值的差异,表示分析区域的高程起伏情况.地形起伏度的计算公......
  • S1 - Lesson 107 - 108
    Wordsmadam aswellalsotooeitheraswell Theshopsellsfoodforthebabiestoo.Theshopalsosellsfoodforbabies.Theshopsellsfoodforthebabi......
  • 漏洞实战部分-安卓应用层getLastPathSegment函数问题
    安卓应用漏洞学习case1本课程学习关键函数getLastPathSegment,该函数源码定义如下:/***Getsthedecodedlastsegmentinthepath.**@returnthedec......
  • 【博学谷学习记录】超强总结,用心分享|狂野架构常见编程规约
    编程规约方法参数类型必须一致,不要出现自动装箱拆箱操作2.1.1.1反例这种操作很容易产生难以排查的NPE异常/***反例*容易出现空指针异常,如果参数为null就会......
  • kerberos搭建基础知识
    kerberos验证流程             配置文件格式                       服务端搭建配置   1......