Supercharge Your Innovation With Domain-Expert AI Agents!

Optimization scheme for modifying python source code to take effect without restarting docker mirror image

An optimization scheme and mirroring technology, applied in the field of network engineering, can solve the problems that cannot be directly applied, cannot be applied, and the python program is not flexible enough, so as to achieve the effect of solving online problems and temporarily fixing bugs

Pending Publication Date: 2022-04-15
UNICLOUD (NANJING) DIGITAL TECH CO LTD
View PDF0 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0002] Docker is an open source application container engine that allows developers to package their applications and dependencies into a portable image, and then publish it to any popular Linux or Windows operating system machine, and can also implement virtualization. The python program is managed through the systemd service in the container, which can start and stop the python program at will, and restart the service after modifying the python service code. However, because the system environment variables of the systemd service do not inherit the system environment variables of docker, the docker The environment variables of the python service program cannot be directly applied to the python program, which reduces the flexibility of the program. The python service program depends on the systemd service, so the environment variable of the python service program uses the environment variable of systemd, so the docker environment variable information cannot be applied to The python service program, because the deployment environment under the cloud computing network may vary with the deployment location, the environment variables of the docker will be different, and the python program needs to be processed differently according to the environment variables of the docker, which cannot meet the usage requirements, resulting in insufficient python programs flexible

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
  • Optimization scheme for modifying python source code to take effect without restarting docker mirror image
  • Optimization scheme for modifying python source code to take effect without restarting docker mirror image

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0020] In order to make the technical means, creative features, goals and effects achieved by the present invention easy to understand, the technical solutions in the specific embodiments of the present invention are clearly and completely described below to further illustrate the present invention. Obviously, the described specific implementation The form is only a part of embodiment of this invention, and it is not all form.

[0021] This specific implementation mode is an optimization scheme for modifying the python source code without restarting the docker image to take effect. The schematic diagram of the system architecture is as follows figure 1 As shown, the schematic diagram of the step process structure is as follows figure 2 As shown, the optimization scheme for modifying the python source code to take effect without restarting the docker image includes the following steps:

[0022] Step 1: Generate a docker image, generate related images through the centos system...

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 provides an optimization scheme for modifying a python source code to take effect without restarting a docker mirror image, which comprises the following steps of: 1, generating the docker mirror image, generating a related mirror image through a centos system, and adding a systemd service on the basis of a basic operating system, 2, compiling a service configuration file and enabling the python service to be managed by the systemd, and 3, compiling a script for executing a specific service starting program, according to the method, the python service is registered in the systemd program, so that the python service can be automatically started during startup, the environment variables of the docker mirror image are notified to the python service program in a mode of registering the environment variables in the systemd service, the change of the environment variables of the docker can be notified to the python service program in time, the flexibility of the program is improved, the environment variables of the docker mirror image are synchronized to the program managed by the systemd process, and the safety of the program is improved. According to the method and the system, quick deployment to different scenes is realized, the service in the docker can be flexibly modified without restarting the docker mirror image, the method and the system can be used as a means for program hot repair, quick and temporary bug repair is realized, and online problems are solved.

Description

technical field [0001] The invention relates to the technical field of network engineering, in particular to an optimization scheme for modifying python source codes to take effect without restarting the docker image. Background technique [0002] Docker is an open source application container engine that allows developers to package their applications and dependencies into a portable image, and then publish it to any popular Linux or Windows operating system machine, and can also implement virtualization. The python program is managed through the systemd service in the container, which can start and stop the python program at will, and restart the service after modifying the python service code. However, because the system environment variables of the systemd service do not inherit the system environment variables of docker, the docker The environment variables of the python service program cannot be directly applied to the python program, which reduces the flexibility of t...

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
Patent Type & Authority Applications(China)
IPC IPC(8): G06F8/71G06F8/61G06F8/72G06F8/76
Inventor 刘永
Owner UNICLOUD (NANJING) DIGITAL 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