Unlock instant, AI-driven research and patent intelligence for your innovation.

Method for adapting to Podman calling by improving Docker Api, terminal equipment and storage medium

A technology for storage media and message data, applied in communication between programs, program control design, instruments, etc., can solve the problems of unrealized interfaces, different names of function interfaces, and great differences in calling methods, so as to reduce secondary development Effect

Pending Publication Date: 2022-03-22
XIAMEN FUYUN INFORMATION TECH CO LTD
View PDF0 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

The earlier version of PodmanApi was designed using the VarLink protocol. The new version implements Api in a similar way to Docker (both adopt the Http rest API method). However, since Podman started relatively late, the official API only provides a relatively basic calling interface. , and most of the call interfaces only provide a function interface, and then directly throw an exception that the interface has not yet been implemented. As a result, if the existing official API is directly called, most of the interfaces cannot be implemented.
If podman implements all the api interfaces in the later stage, it will also operate the docker container because of the docker api used by the user. If the new operation of podman is added, the podman library will be introduced, and the names of the two sets of library function interfaces are quite different, and the calling methods are also very different. Big, the workload is relatively large to transform

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Method for adapting to Podman calling by improving Docker Api, terminal equipment and storage medium

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0021] The embodiment of the present invention provides a Podman calling method by improving DockerApi, such as figure 1 As shown, the following three improvements in the method make it possible to call the docker API to operate the podman container.

[0022] (1) According to the different types of podman and docker servers connected, modify the unix socket path of the dockerapi default connection.

[0023] The default unix socket path started by the docker server is unix: / / / var / run / docker.sock; the default unix socket path started by the podman server is unix: / / / run / podman / podman.sock. In order to be compatible with these two containers, in this embodiment, when calling the dockerapi to initialize, configure the corresponding unix socket path according to different container types, so that the dockerapi can support unix sockets with different paths at the same time.

[0024] (2) When the connected container type is podman, after calling dockerapi to execute the command in th...

Embodiment 2

[0043] The present invention also provides a terminal device adapted to Podman calling by improving DockerApi, including a memory, a processor, and a computer program stored in the memory and operable on the processor, when the processor executes the computer program The steps in the above method embodiment of Embodiment 1 of the present invention are implemented.

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

The invention relates to a method for adapting to Podman calling by improving Docker Api, terminal equipment and a storage medium, and the method comprises the following steps: according to different types of accessed podman and docker containers, modifying a Unix socket path of a docker default connection; when the type of the accessed container is podman, after a dockerapai is called to execute a command in the container, aiming at message data contained in a returned execution result, analyzing by adopting an analysis mode different from that of dockee; and when the type of the accessed container is podman, when the dockerapai is called to obtain process information in the podman container, removing a space character between a parameter-axo and a stat in a top interface provided by the dockerapai. According to the method and the device, certain transformation is carried out on the docker, so that the transformed docker can use container environments of the docker and the podman at the same time, and the workload of secondary development of the docker and the podman and obtaining of container information through remote management of the docker and the podman is reduced.

Description

technical field [0001] The invention relates to the technical field of containers, in particular to a method for invoking Podman by improving DockerApi, a terminal device and a storage medium. Background technique [0002] As an open source container runtime project, Podman can be used on most Linux platforms. Podman provides functions very similar to Docker. The earlier version of PodmanApi was designed using the VarLink protocol. The new version implements Api in a similar way to Docker (both adopt the Http rest API method). However, since Podman started relatively late, the official API only provides a relatively basic calling interface. , and most of the call interfaces only provide a function interface, and then directly throw an exception that the interface has not yet been implemented. As a result, if the existing official API is directly called, most of the interfaces cannot be implemented. If podman implements all the api interfaces in the later stage, it will also...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
IPC IPC(8): G06F9/54
CPCG06F9/547G06F9/546
Inventor 严铭陈奋陈荣有龚利军孙晓波
Owner XIAMEN FUYUN INFORMATION TECH CO LTD
Features
  • R&D
  • Intellectual Property
  • Life Sciences
  • Materials
  • Tech Scout
Why Patsnap Eureka
  • Unparalleled Data Quality
  • Higher Quality Content
  • 60% Fewer Hallucinations
Social media
Patsnap Eureka Blog
Learn More