Method and system for web accessing docker container

A docker container and access request technology, which is applied in the field of cloud computing, can solve the problems of cumbersome remote access process and occupation of Docker host resources, etc., and achieve the effects of easy use, reduced configuration difficulty, and resource saving

Active Publication Date: 2020-07-28
SHANDONG LANGCHAO YUNTOU INFORMATION TECH CO LTD
View PDF1 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0005] The technical task of the present invention is to provide a method and system for Web access to Docker containers to solve the problem that in the prior art Web remote access to Docker containers still needs to create a separate SSH service for remote login access, and parameters such as user names and passwords need to be configured. The remote access process is relatively cumbersome and occupies resources of the Docker host machine

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 and system for web accessing docker container

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0042] A kind of method of Web accessing Docker container of the present invention uses access support component and Web access component, is respectively responsible for providing support function and Web access connection establishment and access function to Docker container access; Described method comprises the following steps:

[0043] (1) The user finds the Docker container to be accessed on the Web page and initiates an access request;

[0044](2) Judging user permissions by accessing support components; if there is no permission, the connection will be terminated and a failure message will be returned; if there is permission, a token (Token, representing the right to perform certain operations) will be created for the Docker container access object), and returns the token to the user;

[0045] (3) Obtain the ID of the Docker container and the IP address of the host machine by accessing the support component, and generate the URL address of the Docker container interfac...

Embodiment 2

[0049] A kind of method of Web accessing Docker container of the present invention uses access support component and Web access component, is respectively responsible for providing support function and Web access connection establishment and access function to Docker container access; Described method comprises the following steps:

[0050] (1) The user finds the Docker container to be accessed on the Web page and initiates an access request;

[0051] (2) Judging the user's authority by accessing the support component; if there is no authority, the connection will be terminated and a failure message will be returned; if there is authority, a token for the Docker container access will be created and the token will be returned to the user;

[0052] (3) Obtain the ID of the Docker container and the IP address of the host machine by accessing the support component, and generate the URL address of the Docker container interface;

[0053] (4) Verify the token through the Web access ...

Embodiment 3

[0057] A kind of method of Web accessing Docker container of the present invention uses access support component and Web access component, is respectively responsible for providing support function and Web access connection establishment and access function to Docker container access; Described method comprises the following steps:

[0058] (1) The user finds the Docker container to be accessed on the Web page and initiates an access request;

[0059] (2) Judging the user authority by accessing the support component; if there is no authority, the connection will be terminated and a failure message will be returned; if there is authority, the token for the Docker container access will be created, and when creating the token for the Docker container access, set Token expiration time, and return the token to the user;

[0060] (3) Obtain the ID of the Docker container and the IP address of the host machine by accessing the support component, and generate the URL address of the Do...

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 discloses a method and a system of a Web for accessing a Docker container, and belongs to the technical field of cloud computing. The technical problems needing to be solved are that an independent SSH service for remote login and access still needs to be built for the Web to access the Docker container remotely, configuration of parameters such as a user name and a password is needed, and the remote access process is tedious. By adoption of the technical scheme, the method comprises the steps of finding a to-be-accessed Docker container at a Web page and initiating an access request by a user; judging user authority by an access support assembly; if the user has the authority, building a token for Docker container access and returning the token to the user; by the access support assembly, obtaining the ID of the Docker container and the IP address of a host machine where the Docker container is, and generating an URL address of the Docker container interface; verifying the token by a Web access assembly, and building Websocket connection through the URL address of the Docker container interface if the token passes the verification; and opening the Web page containing a console terminal of the Docker container through the Web access assembly. The method and the system of the Web for accessing the Docker container can still realize authority control on Docker container access without enabling an sshd course.

Description

technical field [0001] The invention relates to the technical field of cloud computing, in particular to a method and a system for Web accessing a Docker container. Background technique [0002] Docker (Docker is an advanced LXC-based container engine open sourced by the PaaS provider dotCloud, the source code is hosted on Github, based on the go language and open sourced under the Apache2.0 protocol) is an open source application container engine that allows developers to package their The application and dependent packages can be put into a portable container, and then distributed to any popular Linux machine, and virtualization can also be realized. It can be compared to a virtual machine, but it is not a virtual machine itself. [0003] The traditional implementation of the remote access container function is based on the idea of ​​a virtual machine, and an sshd process is started in each container. Due to the particularity of the process with the PID of the container ...

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 Patents(China)
IPC IPC(8): H04L29/08H04L29/06
CPCH04L63/08H04L63/0815H04L67/02H04L67/141
Inventor 张烨
Owner SHANDONG LANGCHAO YUNTOU INFORMATION TECH CO LTD
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products