首页 > 其他分享 >Android 动画实现 从基础到自定义

Android 动画实现 从基础到自定义

时间:2022-12-09 04:22:05浏览次数:62  
标签:动画 container 自定义 runner image access entrypoint Android 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,access,entrypoint,Android,Docker
From: https://www.cnblogs.com/sdfasdf/p/16967912.html

相关文章

  • android studio的gradle同步时报错GradleScriptException
    gradle编译问题:Aproblemoccurredevaluatingproject':login'.>Couldnotfindmethodplugins()forarguments[build_2c31lk3groc7yx58a8uwub95i$_run_closure2@......
  • Win10编译Android版本的FFmpeg库
    OverridetheentrypointofanimageIntroducedinGitLabandGitLabRunner9.4.Readmoreaboutthe extendedconfigurationoptions.Beforeexplainingtheav......
  • 调用自定义的包
    创建被调用的包mkdirtestcdtestgomodinitexample.com/testcattest/test.gopackagetestpackagetestimport"fmt"//func定义函数//Hello函数名//......
  • Android 子菜单
    Android的UI界面都是由View和ViewGroup及其派生类组合而成的。其中,View是所有UI组件的基类,而ViewGroup是容纳View及其派生类的容器,ViewGroup也是从View派......
  • 自定义RBAC(3)
    您好,我是湘王,这是我的51CTO博客,欢迎您来,欢迎您再来~​RBAC类型的权限,本质上是一种对资源访问路径的控制,且具有典型的树型层次结构。而树型结构,天然地就有父结点和子结点的关......
  • 自定义RBAC(3)
    您好,我是湘王,这是我的博客园,欢迎您来,欢迎您再来~ RBAC类型的权限,本质上是一种对资源访问路径的控制,且具有典型的树型层次结构。而树型结构,天然地就有父结点和子结点的关......
  • vue实现自定义字体库
      先看效果是不是你所需要的,再看具体如何实现。   效果如下图所示:         有些字体需要下载,用图片就会变得很不清楚,这样我们就需要去下载字......
  • Freeline - Android平台上的秒级编译方案
    FreeLine是什么?Freeline是蚂蚁金服旗下一站式理财平台​​蚂蚁聚宝​​团队15年10月在Android平台上的量身定做的一个基于动态替换的编译方案,5月阿里集团内部开源,稳定性方面......
  • Android自定义View和Canvas绘图解析
    自定义view的流程分为measure、layout、draw三个主要步骤,今天我们通过源码来分下下measure的过程我们从顶级view开始,顶级view即DecorView,view的事件都是先经过这个DecorVi......
  • android中使用heap分析工具导出到MAT
    android中可以使用heap分析工具导出到MAT,方法为1)在ECLIPSE工具栏中,选择如下图2要将dalvik的导出到java格式的MAT,可以这样 hprof-convdump.......