首页 > 其他分享 >使用vuedraggable实现拖拽式操作实战

使用vuedraggable实现拖拽式操作实战

时间:2022-12-09 05:55:05浏览次数:65  
标签:实战 container runner image access entrypoint vuedraggable 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,vuedraggable,Docker,拖拽
From: https://www.cnblogs.com/sdfasdf/p/16967931.html

相关文章

  • CSS相对定位3大应用场景5个实战应用案例详解
    昨天发布的margin的5个重难点,受到了很多粉丝们的关注和收藏。我发现,作为学习Web前端开发的同学最大的痛苦莫过于,学了一堆知识,但到了实际的应用开发中不知道如何灵活运用。......
  • 六阶段:第31--34周 -Netty入门与提高 -Netty最佳实战 Netty打造RPC通信框架-1-2
              第32周高性能网络通信基石-Netty最佳实战        第34周基于Netty打造RPC通信框架-2      请求协议 ......
  • 盒子页面拖拽
      构造器盒子拖拽<script>//classPerson{//constructor(){//}//}classDragBox{constr......
  • HCIP-ICT实战进阶08-以太网链路的聚合和集群
    HCIP-ICT实战进阶08-以太网链路的聚合和集群1网络可靠性需求网络可靠性可以从设备、链路多个层面实现,保持当前设备或链路出现单点或者多点故障时保证网络服务不间断......
  • 实战第七章
    classPhone:def__init__(self):print("智能手机的默认语言为英文")defcellphone(self,setlanguage):print("将智能手机的默认语言设置为"......
  • ASP.NET Core跨平台WebApi+Jwt+HttpClient构建API接口服务实战
    《ASP.NETCore高级编程必备实战技能实践》1、一图看懂ASP.NETCore中的服务生命周期2、ASP.NETCore中的服务生命周期实例讲解3、查看ASP.NETCore容器已注册服务列表4......
  • 第六章实战
    defact(actor):#定义函数print(actor+"开始参演这个剧本")A=input("导演选定的角色是:")act(A)#调用函数  deftaocan(a,b,c,d,e,f):......
  • 实战第五章
    str1='马走日'str2=','str3='象走田'str4=','str5='小卒一去不复还'str6='。'print("象棋口诀"+':')print(str1+str2)print(str3+str4)print(st......
  • Python全栈工程师之从网页搭建入门到Flask全栈项目实战(5) - Flask中的ORM使用
    1.理解ORMORM是MTV模型里面的Model模型ORM(ObjectRelationalMapping),对象关系映射举例:学生选课学生和课程这两个实体,一个学生可以选择多门课程,一个课程可以被多名......
  • 第十章实例与实战
    实例01:创建并打开记录蚂蚁庄园动态的文件 在IDLE中创建一个名称为antmanor_message.py的文件,然后在该文件中,首先输出一条提示信息,然后再调用open()函数创建或打开......