JP6581155B2 - Unnecessary file detection device, unnecessary file detection method and unnecessary file detection program - Google Patents

Unnecessary file detection device, unnecessary file detection method and unnecessary file detection program Download PDF

Info

Publication number
JP6581155B2
JP6581155B2 JP2017146979A JP2017146979A JP6581155B2 JP 6581155 B2 JP6581155 B2 JP 6581155B2 JP 2017146979 A JP2017146979 A JP 2017146979A JP 2017146979 A JP2017146979 A JP 2017146979A JP 6581155 B2 JP6581155 B2 JP 6581155B2
Authority
JP
Japan
Prior art keywords
file
layer
image
unnecessary
file system
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
JP2017146979A
Other languages
Japanese (ja)
Other versions
JP2019028689A (en
Inventor
悠司 大嶋
悠司 大嶋
圭 大村
圭 大村
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Nippon Telegraph and Telephone Corp
Original Assignee
Nippon Telegraph and Telephone Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Nippon Telegraph and Telephone Corp filed Critical Nippon Telegraph and Telephone Corp
Priority to JP2017146979A priority Critical patent/JP6581155B2/en
Publication of JP2019028689A publication Critical patent/JP2019028689A/en
Application granted granted Critical
Publication of JP6581155B2 publication Critical patent/JP6581155B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Description

本発明は、不要ファイル検出装置、不要ファイル検出方法および不要ファイル検出プログラムに関する。   The present invention relates to an unnecessary file detection device, an unnecessary file detection method, and an unnecessary file detection program.

従来、エッジコンピューティングにおけるエッジ端末上で動作するアプリケーションの元となるコンテナイメージが知られている。クラウドなどで管理するコンテナイメージを様々なエッジサーバに配信する。このようなコンテナイメージは、あるOS(Operating System)に対してアプリケーション実行に必要なミドルウェアやライブラリ、アプリケーションの実行ファイルなどをインストールして、イメージ化したものである。   Conventionally, a container image that is a source of an application that operates on an edge terminal in edge computing is known. Distribute container images managed in the cloud to various edge servers. Such a container image is an image obtained by installing middleware and libraries necessary for application execution, an application execution file, and the like on a certain OS (Operating System).

コンテナイメージの定義手段として、レイヤにわけて構成させる方法がある。レイヤはイメージ定義ファイルで定義したイメージを作成するための手順ごとに一つのレイヤとなり、これらを積み重ねていくことで、一つのコンテナイメージとする方法がある(例えば、非特許文献1参照)。また、例えば、イメージの転送を行う場合にレイヤごとの転送が可能であり、エッジサーバに転送済のイメージに変更が生じた際に、差分があるレイヤのみ転送する方法がある。一方、イメージのレイヤ情報を統合して一つの大きなレイヤとして管理する方法も存在する(例えば、非特許文献2参照)。   As a means for defining a container image, there is a method in which the container image is divided into layers. A layer becomes one layer for every procedure for creating an image defined in an image definition file, and there is a method of stacking these layers to form one container image (see, for example, Non-Patent Document 1). Further, for example, when transferring an image, there is a method in which transfer for each layer is possible, and when an image transferred to an edge server is changed, only a layer having a difference is transferred. On the other hand, there is a method of integrating image layer information and managing it as one large layer (see, for example, Non-Patent Document 2).

“Dockerfile reference”、[online]、Docker、[平成29年7月18日検索]、インターネット<https://docs.docker.com/engine/reference/builder/>“Dockerfile reference”, [online], Docker, [searched July 18, 2017], Internet <https://docs.docker.com/engine/reference/builder/> “Squash an image’s layers(-squash) Experimental Only”、[online]、Docker、[平成29年7月18日検索]、インターネット<https://docs.docker.com/engine/reference/commandline/build/#squash-an-images-layers-squash-experimental-only>“Squash an image's layers (-squash) Experimental Only”, [online], Docker, [Search July 18, 2017], Internet <https://docs.docker.com/engine/reference/commandline/build/ # squash-an-images-layers-squash-experimental-only>

しかしながら、従来の技術では、コンテナイメージに不要な情報が含まれている場合があるため、コンテナイメージを軽量化することができないという課題があった。例えば、従来の技術では、コンテナイメージを複数のレイヤに分割することでイメージの作成や配信の効率化を行うが、レイヤには上位と下位の関係が存在し下位レイヤは上位レイヤに依存しないため上位レイヤでの処理を下位レイヤは意識しない。そのため上位レイヤで削除されるファイルが下位レイヤに残った状態となることがある。   However, the conventional technique has a problem that the container image cannot be reduced in weight because unnecessary information may be included in the container image. For example, in the conventional technology, the container image is divided into multiple layers to create and distribute images more efficiently. However, there is a relationship between upper and lower layers, and lower layers do not depend on higher layers. The lower layer is not aware of the processing in the upper layer. For this reason, a file to be deleted in the upper layer may remain in the lower layer.

具体例を挙げて説明すると、例えば、レイヤごとに操作が独立であるため、あるレイヤ1でファイルAをイメージ内に保存し、その上位レイヤ2で保存したファイルAを削除したとしても、レイヤ1にはファイルAの情報が残り、最終的な実行時にはファイルAは削除されているにも関わらずイメージサイズにはファイルAの容量が加算される。   For example, since the operation is independent for each layer, even if the file A is saved in the image in a certain layer 1 and the file A saved in the upper layer 2 is deleted, the layer 1 The information of file A remains, and the file A capacity is added to the image size even though the file A is deleted at the time of final execution.

なお、これを防ぐためにはイメージ作成者がレイヤの作成方法を工夫する必要があるが、中間レイヤにファイルが残っていたとしても実行時ファイルシステムにはファイルは残っていないためどのファイルが中間レイヤに残っているかを検出するのが困難であった。   Incidentally, it is necessary to image creators to devise how to create a layer in order to prevent this, which files for the runtime file system file does not remain even if it remains in the intermediate layers file intermediate layer It was difficult to detect what remained.

上述した課題を解決し、目的を達成するために、本発明の不要ファイル検出装置は、アプリケーションの動作の元となるコンテナイメージをレイヤごとに定義するイメージ定義ファイルを用いてイメージファイルを作成し、該イメージファイルから前記レイヤの情報を削除した実行時ファイルシステムを作成する作成部と、前記作成部によって作成された実行時ファイルシステムの内容と、前記イメージ定義ファイルにおける各レイヤのファイルシステムの内容とを比較し、前記各レイヤのファイルシステムにおいて前記実行時ファイルシステムに含まれないファイルをそれぞれ検出する検出部とを有することを特徴とする。   In order to solve the above-described problems and achieve the object, the unnecessary file detection apparatus of the present invention creates an image file using an image definition file that defines a container image that is a source of application operation for each layer, A creation unit that creates a runtime file system in which the layer information is deleted from the image file; a content of the runtime file system created by the creation unit; and a content of the file system of each layer in the image definition file; And a detection unit for detecting each file not included in the runtime file system in the file system of each layer.

また、本発明の不要ファイル検出方法は、不要ファイル検出装置によって実行される不要ファイル検出方法であって、アプリケーションの動作の元となるコンテナイメージをレイヤごとに定義するイメージ定義ファイルを用いてイメージファイルを作成し、該イメージファイルから前記レイヤの情報を削除した実行時ファイルシステムを作成する作成工程と、前記作成工程によって作成された実行時ファイルシステムの内容と、前記イメージ定義ファイルにおける各レイヤのファイルシステムの内容とを比較し、前記各レイヤのファイルシステムにおいて前記実行時ファイルシステムに含まれないファイルをそれぞれ検出する検出工程とを含んだことを特徴とする。   The unnecessary file detection method of the present invention is an unnecessary file detection method executed by an unnecessary file detection apparatus, and uses an image definition file that defines a container image that is a source of operation of an application for each layer. Creating a runtime file system in which the layer information is deleted from the image file, the contents of the runtime file system created by the creating step, and the file of each layer in the image definition file A detection step of comparing the contents of the system with each other and detecting a file not included in the runtime file system in the file system of each layer.

また、本発明の不要ファイル検出プログラムは、アプリケーションの動作の元となるコンテナイメージをレイヤごとに定義するイメージ定義ファイルを用いてイメージファイルを作成し、該イメージファイルから前記レイヤの情報を削除した実行時ファイルシステムを作成する作成ステップと、前記作成ステップによって作成された実行時ファイルシステムの内容と、前記イメージ定義ファイルにおける各レイヤのファイルシステムの内容とを比較し、前記各レイヤのファイルシステムにおいて前記実行時ファイルシステムに含まれないファイルをそれぞれ検出する検出ステップとをコンピュータに実行させる。   In addition, the unnecessary file detection program of the present invention creates an image file using an image definition file that defines a container image that is a source of application operation for each layer, and deletes the layer information from the image file. A creation step for creating an hour file system, and the contents of the runtime file system created by the creation step are compared with the contents of the file system of each layer in the image definition file, and the file system of each layer Causing the computer to execute a detection step of detecting each file not included in the runtime file system.

本発明によれば、コンテナイメージから不要な情報を削除し、コンテナイメージを軽量化することができるという効果を奏する。   According to the present invention, there is an effect that unnecessary information can be deleted from the container image and the container image can be reduced in weight.

図1は、第一の実施の形態に係る配信システムの構成の一例を示す図である。FIG. 1 is a diagram illustrating an example of a configuration of a distribution system according to the first embodiment. 図2は、第一の実施の形態に係る不要ファイル検出装置の構成例を示すブロック図である。FIG. 2 is a block diagram illustrating a configuration example of the unnecessary file detection apparatus according to the first embodiment. 図3は、不要ファイル情報記憶部に記憶される情報の一例を示す図である。FIG. 3 is a diagram illustrating an example of information stored in the unnecessary file information storage unit. 図4は、不要ファイル検出処理の一例を説明する図である。FIG. 4 is a diagram illustrating an example of the unnecessary file detection process. 図5は、第一の実施の形態に係る不要ファイル検出装置による処理を説明するフローチャートである。FIG. 5 is a flowchart for explaining processing by the unnecessary file detection apparatus according to the first embodiment. 図6は、不要ファイル検出プログラムを実行するコンピュータを示す図である。FIG. 6 is a diagram illustrating a computer that executes an unnecessary file detection program.

以下に、本願に係る不要ファイル検出装置、不要ファイル検出方法および不要ファイル検出プログラムの実施の形態を図面に基づいて詳細に説明する。なお、この実施の形態により本願に係る不要ファイル検出装置、不要ファイル検出方法および不要ファイル検出プログラムが限定されるものではない。   Embodiments of an unnecessary file detection device, an unnecessary file detection method, and an unnecessary file detection program according to the present application will be described below in detail with reference to the drawings. In addition, the unnecessary file detection apparatus, the unnecessary file detection method, and the unnecessary file detection program according to the present application are not limited by this embodiment.

[第一の実施の形態]
以下の実施の形態では、第一の実施の形態に係る配信システムの構成、不要ファイル検出装置の構成、不要ファイル検出装置における処理の流れを順に説明し、最後に第一の実施の形態による効果を説明する。
[First embodiment]
In the following embodiments, the configuration of the distribution system according to the first embodiment, the configuration of the unnecessary file detection device, the processing flow in the unnecessary file detection device will be described in order, and finally the effect of the first embodiment Will be explained.

[配信システムの構成]
まず、図1を用いて、第一の実施の形態に係る配信システムについて説明する。図1は、第一の実施の形態に係る配信システムの構成の一例を示す図である。第一の実施の形態に係る配信システムは、不要ファイル検出装置10、配信サーバ20および複数のエッジ端末30A、30Bを有し、各装置は通信網40を介して接続されている。なお、複数のエッジ端末30A、30Bについて、特に区別なく説明する場合には、エッジ端末30と記載する。また、図1に示す各装置の数は、あくまで一例であり、これに限られるものではない。
[Configuration of distribution system]
First, the distribution system according to the first embodiment will be described with reference to FIG. FIG. 1 is a diagram illustrating an example of a configuration of a distribution system according to the first embodiment. The distribution system according to the first embodiment includes an unnecessary file detection device 10, a distribution server 20, and a plurality of edge terminals 30 </ b> A and 30 </ b> B, and each device is connected via a communication network 40. Note that the edge terminals 30 </ b> A and 30 </ b> B are referred to as edge terminals 30 when they are described without distinction. Moreover, the number of each apparatus shown in FIG. 1 is an example to the last, and is not restricted to this.

不要ファイル検出装置10は、イメージ定義ファイルの入力を受け付けると、イメージ定義ファイルを用いてイメージを作成し、レイヤ情報を削除したイメージを実行時ファイルシステムとして作成する。その後、不要ファイル検出装置10は、イメージ定義ファイルの各レイヤでのファイルシステムの内容と実行時ファイルシステムの内容とを比較し、実行時ファイルシステムに含まれないファイルがレイヤに存在するかを確認する。そして、不要ファイル検出装置10は、実行時ファイルシステムに含まれないファイルがレイヤに存在する場合には、該ファイルを不要ファイルとしてユーザに提示する。   When receiving the input of the image definition file, the unnecessary file detection apparatus 10 creates an image using the image definition file and creates an image from which the layer information is deleted as a runtime file system. Thereafter, the unnecessary file detection apparatus 10 compares the contents of the file system in each layer of the image definition file with the contents of the runtime file system, and confirms whether a file not included in the runtime file system exists in the layer. To do. Then, when a file that is not included in the runtime file system exists in the layer, the unnecessary file detection apparatus 10 presents the file to the user as an unnecessary file.

配信サーバ20は、エッジコンピューティングにおけるエッジ端末30上で動作するアプリケーションの元となるコンテナイメージをエッジ端末30に配信する。コンテナイメージとは、アプリケーション実行環境を内包するイメージファイルであり、例えば、アプリケーション開発者により、イメージ定義ファイルを用いて作成される。また、コンテナイメージは、複数のレイヤから構成される。各レイヤは、イメージ定義ファイルで定義される。   The distribution server 20 distributes to the edge terminal 30 a container image that is a source of an application that runs on the edge terminal 30 in edge computing. A container image is an image file that includes an application execution environment, and is created by an application developer using an image definition file, for example. The container image is composed of a plurality of layers. Each layer is defined by an image definition file.

エッジ端末30A、30Bは、例えば、エッジコンピューティングアーキテクチャにおいてエッジサーバとして用いられる装置であり、アプリケーションを動作させる装置である。エッジ端末30A、30Bは、配信サーバ20から配信されたコンテナイメージを受信し、受信したコンテナイメージを基にアプリケーションを動作させる。なお、エッジアーキテクチャにおいてエッジ端末30A、30Bは、データセンタ内と比較しリソース(ディスクやネットワーク帯域)が貧弱であることが多い。そのため、ディスクを有効活用するためにはコンテナイメージを小さくする必要があり、不要なファイルはイメージ内から削除する必要がある。   The edge terminals 30A and 30B are, for example, devices used as edge servers in the edge computing architecture, and are devices that operate applications. The edge terminals 30A and 30B receive the container image distributed from the distribution server 20, and operate the application based on the received container image. In the edge architecture, the edge terminals 30A and 30B often have poor resources (disk and network bandwidth) compared to the data center. Therefore, in order to effectively use the disk, it is necessary to make the container image small, and it is necessary to delete unnecessary files from the image.

第一の実施の形態に係る不要ファイル検出装置10では、各レイヤと実行時ファイルシステムとを比較することですべてのレイヤに実行時ファイルシステムにはないファイルが残留していないかを自動的に検出する。このため、イメージファイル全体のサイズの削減とコンテナイメージ内に含めたくない不要なファイル(例えば、ソースコードなど)がイメージ内に混入してしまうことを防ぐことが可能である。   In the unnecessary file detection apparatus 10 according to the first embodiment, by comparing each layer with the runtime file system, it is automatically determined whether any files that are not in the runtime file system remain in all layers. To detect. For this reason, it is possible to reduce the size of the entire image file and prevent unnecessary files (for example, source code) that are not desired to be included in the container image from being mixed in the image.

[不要ファイル検出装置の構成]
次に、図2を用いて、図1に示した不要ファイル検出装置10の構成を説明する。図2は、第一の実施の形態に係る不要ファイル検出装置の構成例を示すブロック図である。図2に示すように、この不要ファイル検出装置10は、通信処理部11、入力部12、出力部13、制御部14および記憶部15を有する。以下に不要ファイル検出装置10が有する各部の処理を説明する。なお、不要ファイル検出装置10の各機能の一部または全てを、配信サーバ20が保持してもよい。
[Configuration of unnecessary file detection device]
Next, the configuration of the unnecessary file detection apparatus 10 shown in FIG. 1 will be described with reference to FIG. FIG. 2 is a block diagram illustrating a configuration example of the unnecessary file detection apparatus according to the first embodiment. As illustrated in FIG. 2, the unnecessary file detection apparatus 10 includes a communication processing unit 11, an input unit 12, an output unit 13, a control unit 14, and a storage unit 15. The processing of each unit included in the unnecessary file detection device 10 will be described below. The distribution server 20 may hold some or all of the functions of the unnecessary file detection device 10.

通信処理部11は、接続される装置との間でやり取りする各種情報に関する通信を制御する。例えば、通信処理部11は、不要なファイルが削除されたコンテナイメージを配信サーバ20に送信する。   The communication processing unit 11 controls communication related to various types of information exchanged with a connected device. For example, the communication processing unit 11 transmits a container image from which unnecessary files are deleted to the distribution server 20.

入力部12は、キーボードやマウスなどの入力デバイスであり、ユーザから各種情報の入力操作を受付ける。出力部13は、ディスプレイなどの出力デバイスであり、各種情報を出力する。   The input unit 12 is an input device such as a keyboard or a mouse, and receives input operations of various information from the user. The output unit 13 is an output device such as a display, and outputs various information.

また、記憶部15は、制御部14による各種処理に必要なデータおよびプログラムを格納するが、特に本発明に密接に関連するものとしては、不要ファイル情報記憶部15aを有する。例えば、記憶部15は、RAM(Random Access Memory)、フラッシュメモリ(Flash Memory)等の半導体メモリ素子、又は、ハードディスク、光ディスク等の記憶装置などである。   The storage unit 15 stores data and programs necessary for various processes performed by the control unit 14, and has an unnecessary file information storage unit 15a particularly closely related to the present invention. For example, the storage unit 15 is a semiconductor memory device such as a RAM (Random Access Memory) or a flash memory, or a storage device such as a hard disk or an optical disk.

不要ファイル情報記憶部15aは、後述する検出部14bによって検出された各レイヤの不要ファイルを記憶する。ここで、図3を用いて、不要ファイル情報記憶部15aに記憶される情報について説明する。図3は、不要ファイル情報記憶部に記憶される情報の一例を示す図である。図3に例示するように、不要ファイル情報記憶部15aは、レイヤを識別する情報である「レイヤ」と、各レイヤにおいて不要ファイルとして検出されたファイルを識別する情報である「不要ファイル」とを対応付けて記憶する。   The unnecessary file information storage unit 15a stores an unnecessary file of each layer detected by the detection unit 14b described later. Here, the information stored in the unnecessary file information storage unit 15a will be described with reference to FIG. FIG. 3 is a diagram illustrating an example of information stored in the unnecessary file information storage unit. As illustrated in FIG. 3, the unnecessary file information storage unit 15 a includes “layer” that is information for identifying a layer and “unnecessary file” that is information for identifying a file detected as an unnecessary file in each layer. Store in association with each other.

図3に例示するように、不要ファイル情報記憶部15aは、「レイヤ1」に対応付けて不要ファイル「ファイルA、ファイルB」を記憶する。これは、「レイヤ1」において、「ファイルA、ファイルB」が不要ファイルとして検出されたことを意味する。   As illustrated in FIG. 3, the unnecessary file information storage unit 15 a stores unnecessary files “file A, file B” in association with “layer 1”. This means that “file A, file B” is detected as an unnecessary file in “layer 1”.

制御部14は、各種の処理手順などを規定したプログラムおよび所要データを格納するための内部メモリを有し、これらによって種々の処理を実行するが、特に本発明に密接に関連するものとしては、作成部14a、検出部14bおよび提示部14cを有する。ここで、制御部14は、CPU(Central Processing Unit)やMPU(Micro Processing Unit)などの電子回路やASIC(Application Specific Integrated Circuit)やFPGA(Field Programmable Gate Array)などの集積回路である。   The control unit 14 has an internal memory for storing a program that defines various processing procedures and the necessary data, and performs various processes by using these programs. Particularly, as closely related to the present invention, A creation unit 14a, a detection unit 14b, and a presentation unit 14c are included. Here, the control unit 14 is an electronic circuit such as a CPU (Central Processing Unit) or an MPU (Micro Processing Unit), or an integrated circuit such as an ASIC (Application Specific Integrated Circuit) or an FPGA (Field Programmable Gate Array).

作成部14aは、アプリケーションの動作の元となるコンテナイメージをレイヤごとに定義するイメージ定義ファイルを用いてイメージファイルを作成し、該イメージファイルからレイヤの情報を削除した実行時ファイルシステムを作成する。例えば、作成部14aは、入力部12を介してユーザからのイメージ定義ファイルの入力を受け付けると、該イメージ定義ファイルを用いてイメージファイルを作成する。   The creation unit 14a creates an image file using an image definition file that defines a container image that is an operation source of an application for each layer, and creates a runtime file system in which layer information is deleted from the image file. For example, when receiving the input of the image definition file from the user via the input unit 12, the creation unit 14a creates an image file using the image definition file.

そして、作成部14aは、イメージファイルからレイヤの情報を削除した実行時ファイルシステムを作成する。ここで、イメージファイルからレイヤの情報を削除した実行時ファイルシステムを作成する手法としては、既知の手法(例えば、非特許文献2参照)を用いてもよく、例えば、作成部14aは、レイヤごとの構成情報を削除し、1つの大きなレイヤで構成される実行時ファイルシステムを作成する。この実行時ファイルシステムには、不要なファイルが残っていないものとする。   Then, the creation unit 14a creates a runtime file system in which the layer information is deleted from the image file. Here, as a method for creating a runtime file system in which layer information is deleted from an image file, a known method (for example, see Non-Patent Document 2) may be used. Is deleted, and a runtime file system composed of one large layer is created. It is assumed that no unnecessary files remain in this runtime file system.

検出部14bは、作成部14aによって作成された実行時ファイルシステムの内容と、イメージ定義ファイルにおける各レイヤのファイルシステムの内容とを比較し、各レイヤのファイルシステムにおいて実行時ファイルシステムに含まれないファイルをそれぞれ検出する。   The detection unit 14b compares the content of the runtime file system created by the creation unit 14a with the content of the file system of each layer in the image definition file, and is not included in the runtime file system in the file system of each layer. Detect each file.

例えば、検出部14bは、イメージ定義ファイルにおける最下位のレイヤから最上位のレイヤまで、実行時ファイルシステムの内容と各レイヤのファイルシステムの内容とを順次比較し、各レイヤのファイルシステムにおいて実行時ファイルシステムに含まれないファイルをそれぞれ検出し、不要ファイル情報記憶部15aに格納する。   For example, the detection unit 14b sequentially compares the contents of the runtime file system and the contents of the file system of each layer from the lowest layer to the highest layer in the image definition file, and executes the execution in the file system of each layer. Each file not included in the file system is detected and stored in the unnecessary file information storage unit 15a.

ここで、図4を用いて、不要ファイル検出処理の一例を説明する。図4は、不要ファイル検出処理の一例を説明する図である。図4に例示するように、検出部14bは、イメージ定義ファイルにおけるレイヤのうち、最下位レイヤを対象レイヤとして選択する。なお、図4の例では、最下位レイヤとは「レイヤ1」であり、「レイヤ2」、「レイヤ3」・・・の順に上位のレイヤになるものとする。そして、検出部14bは、実行時ファイルシステムの内容と「レイヤ1」のファイルシステムの内容とを比較し、「レイヤ1」のファイルシステムにおいて実行時ファイルシステムに含まれない不要ファイルとして、「ファイルA」および「ファイルB」を検出する。   Here, an example of the unnecessary file detection process will be described with reference to FIG. FIG. 4 is a diagram illustrating an example of the unnecessary file detection process. As illustrated in FIG. 4, the detection unit 14 b selects the lowest layer among the layers in the image definition file as the target layer. In the example of FIG. 4, the lowest layer is “layer 1”, and is assumed to be an upper layer in the order of “layer 2”, “layer 3”. Then, the detection unit 14b compares the contents of the runtime file system with the contents of the “layer 1” file system, and identifies “files” as unnecessary files that are not included in the runtime file system in the “layer 1” file system. A ”and“ File B ”are detected.

次に、検出部14bは、1つ上位のレイヤである「レイヤ2」を対象レイヤとして選択する。そして、検出部14bは、実行時ファイルシステムの内容と「レイヤ2」のファイルシステムの内容とを比較し、「レイヤ2」のファイルシステムにおいて実行時ファイルシステムに含まれない不要ファイルとして、「ファイルA」を検出する。そして、このような不要ファイル検出処理を最上位レイヤまで繰り返し行う。   Next, the detection unit 14b selects “layer 2”, which is an upper layer, as a target layer. Then, the detection unit 14b compares the contents of the runtime file system with the contents of the “layer 2” file system, and identifies “files” as unnecessary files that are not included in the runtime file system in the “layer 2” file system. A ”is detected. Such unnecessary file detection processing is repeated up to the highest layer.

提示部14cは、検出部14bによって検出されたファイルを不要ファイルとして提示する。具体的には、提示部14cは、不要ファイル情報記憶部15aに記憶された各レイヤの不要ファイルを読み出し、ユーザに提示する。   The presentation unit 14c presents the file detected by the detection unit 14b as an unnecessary file. Specifically, the presentation unit 14c reads out unnecessary files of each layer stored in the unnecessary file information storage unit 15a and presents them to the user.

このように、不要ファイル検出装置10は、各レイヤにおける不要ファイルをユーザに提示することで、実行時ファイルにシステムにはないファイルが残留していることをユーザに知らせることが可能である。このため、コンテナイメージ内に含めたくないファイルがイメージ内に混入することを防止することが可能であり、不要なファイルが削除されたコンテナイメージを配信サーバ20に送信することが出来る。   In this way, the unnecessary file detection apparatus 10 can notify the user that files that are not in the system remain in the runtime file by presenting the unnecessary files in each layer to the user. For this reason, it is possible to prevent a file that is not desired to be included in the container image from being mixed in the image, and the container image from which unnecessary files are deleted can be transmitted to the distribution server 20.

[不要ファイル検出装置の処理の流れ]
次に、図5を用いて、第一の実施の形態に係る不要ファイル検出装置10の処理の流れを説明する。図5は、第一の実施の形態に係る不要ファイル検出装置による処理を説明するフローチャートである。
[Processing flow of unnecessary file detection device]
Next, a processing flow of the unnecessary file detection apparatus 10 according to the first embodiment will be described with reference to FIG. FIG. 5 is a flowchart for explaining processing by the unnecessary file detection apparatus according to the first embodiment.

図5に示すように、不要ファイル検出装置10の作成部14aは、入力部12を介してユーザからのイメージ定義ファイルの入力を受け付けると(ステップS101肯定)、該イメージ定義ファイルを用いてイメージファイルを作成し、該イメージファイルから実行時ファイルシステムを作成する(ステップS102)。   As illustrated in FIG. 5, when the creation unit 14a of the unnecessary file detection apparatus 10 receives an input of an image definition file from the user via the input unit 12 (Yes in step S101), the image file is used using the image definition file. And a runtime file system is created from the image file (step S102).

そして、検出部14bは、イメージ定義ファイルにおけるレイヤのうち、最下位レイヤを対象レイヤとして選択する(ステップS103)。続いて、検出部14bは、対象レイヤのファイルシステムを展開し(ステップS104)、対象レイヤのファイルシステムと実行時ファイルシステムとの比較を行う(ステップS105)。   Then, the detection unit 14b selects the lowest layer among the layers in the image definition file as the target layer (step S103). Subsequently, the detection unit 14b expands the file system of the target layer (step S104), and compares the file system of the target layer with the runtime file system (step S105).

そして、検出部14bは、実行時ファイルシステムに存在しないが、対象レイヤのファイルシステムに存在するファイルを検出する(ステップS106)。その後、検出部14bは、対象レイヤが最上位レイヤであるか判定する(ステップS107)。この結果、対象レイヤが最上位レイヤでない場合には(ステップS107否定)、検出部14bは、1つ上位のレイヤを対象レイヤとして選択し(ステップS108)、ステップS104の処理に戻る。そして、検出部14bは、最上位レイヤを対象レイヤとするまでステップS104〜ステップS107の処理を繰り返し行う。   Then, the detection unit 14b detects a file that does not exist in the runtime file system but exists in the file system of the target layer (step S106). Thereafter, the detection unit 14b determines whether the target layer is the highest layer (step S107). As a result, when the target layer is not the highest layer (No at Step S107), the detection unit 14b selects the upper layer as the target layer (Step S108), and returns to the process of Step S104. And the detection part 14b repeats the process of step S104-step S107 until the highest layer is made into an object layer.

そして、検出部14bが、対象レイヤが最上位レイヤであると判定した場合には(ステップS107肯定)、提示部14cは、検出したファイルを不要ファイルとして提示する(ステップS109)。   When the detection unit 14b determines that the target layer is the highest layer (Yes at Step S107), the presentation unit 14c presents the detected file as an unnecessary file (Step S109).

[第一の実施の形態の効果]
このように、第一の実施の形態に係る不要ファイル検出装置10は、アプリケーションの動作の元となるコンテナイメージをレイヤごとに定義するイメージ定義ファイルを用いてイメージファイルを作成し、該イメージファイルからレイヤの情報を削除した実行時ファイルシステムを作成する。そして、不要ファイル検出装置10は、作成された実行時ファイルシステムの内容と、イメージ定義ファイルにおける各レイヤのファイルシステムの内容とを比較し、各レイヤのファイルシステムにおいて実行時ファイルシステムに含まれないファイルをそれぞれ検出する。このため、コンテナイメージから不要な情報を削除し、コンテナイメージを軽量化することが可能である。
[Effect of the first embodiment]
As described above, the unnecessary file detection apparatus 10 according to the first embodiment creates an image file using an image definition file that defines a container image that is a source of operation of an application for each layer, and uses the image file from the image file. Create a runtime file system from which layer information has been deleted. The unnecessary file detection apparatus 10 compares the contents of the created runtime file system with the contents of the file system of each layer in the image definition file, and is not included in the runtime file system in the file system of each layer. Detect each file. For this reason, unnecessary information can be deleted from the container image to reduce the weight of the container image.

つまり、不要ファイル検出装置10では、各レイヤと実行時ファイルシステムとを比較することですべてのレイヤに実行時ファイルシステムにはないファイルが残留していないかを自動的に検出する。このため、イメージファイル全体のサイズの削減とコンテナイメージ内に含めたくない不要なファイル(例えば、ソースコードなど)がイメージ内に混入してしまうことを防ぐことが可能である。   In other words, the unnecessary file detection apparatus 10 automatically detects whether or not any files that are not in the runtime file system remain in all layers by comparing each layer with the runtime file system. For this reason, it is possible to reduce the size of the entire image file and prevent unnecessary files (for example, source code) that are not desired to be included in the container image from being mixed in the image.

[システム構成等]
また、図示した各装置の各構成要素は機能概念的なものであり、必ずしも物理的に図示の如く構成されていることを要しない。すなわち、各装置の分散・統合の具体的形態は図示のものに限られず、その全部または一部を、各種の負荷や使用状況などに応じて、任意の単位で機能的または物理的に分散・統合して構成することができる。さらに、各装置にて行われる各処理機能は、その全部または任意の一部が、CPUおよび当該CPUにて解析実行されるプログラムにて実現され、あるいは、ワイヤードロジックによるハードウェアとして実現され得る。
[System configuration, etc.]
Further, each component of each illustrated apparatus is functionally conceptual, and does not necessarily need to be physically configured as illustrated. In other words, the specific form of distribution / integration of each device is not limited to that shown in the figure, and all or a part thereof may be functionally or physically distributed or arbitrarily distributed in arbitrary units according to various loads or usage conditions. Can be integrated and configured. Furthermore, all or a part of each processing function performed in each device may be realized by a CPU and a program that is analyzed and executed by the CPU, or may be realized as hardware by wired logic.

また、本実施の形態において説明した各処理のうち、自動的に行われるものとして説明した処理の全部または一部を手動的に行うこともでき、あるいは、手動的におこなわれるものとして説明した処理の全部または一部を公知の方法で自動的に行うこともできる。この他、上記文書中や図面中で示した処理手順、制御手順、具体的名称、各種のデータやパラメータを含む情報については、特記する場合を除いて任意に変更することができる。   In addition, among the processes described in the present embodiment, all or part of the processes described as being automatically performed can be manually performed, or the processes described as being manually performed All or a part of the above can be automatically performed by a known method. In addition, the processing procedure, control procedure, specific name, and information including various data and parameters shown in the above-described document and drawings can be arbitrarily changed unless otherwise specified.

[プログラム]
図6は、不要ファイル検出プログラムを実行するコンピュータを示す図である。コンピュータ1000は、例えば、メモリ1010、CPU1020を有する。また、コンピュータ1000は、ハードディスクドライブインタフェース1030、ディスクドライブインタフェース1040、シリアルポートインタフェース1050、ビデオアダプタ1060、ネットワークインタフェース1070を有する。これらの各部は、バス1080によって接続される。
[program]
FIG. 6 is a diagram illustrating a computer that executes an unnecessary file detection program. The computer 1000 includes a memory 1010 and a CPU 1020, for example. The computer 1000 also includes a hard disk drive interface 1030, a disk drive interface 1040, a serial port interface 1050, a video adapter 1060, and a network interface 1070. These units are connected by a bus 1080.

メモリ1010は、ROM(Read Only Memory)1011及びRAM1012を含む。ROM1011は、例えば、BIOS(Basic Input Output System)等のブートプログラムを記憶する。ハードディスクドライブインタフェース1030は、ハードディスクドライブ1090に接続される。ディスクドライブインタフェース1040は、ディスクドライブ1100に接続される。例えば磁気ディスクや光ディスク等の着脱可能な記憶媒体が、ディスクドライブ1100に挿入される。シリアルポートインタフェース1050は、例えばマウス1051、キーボード1052に接続される。ビデオアダプタ1060は、例えばディスプレイ1061に接続される。   The memory 1010 includes a ROM (Read Only Memory) 1011 and a RAM 1012. The ROM 1011 stores a boot program such as BIOS (Basic Input Output System). The hard disk drive interface 1030 is connected to the hard disk drive 1090. The disk drive interface 1040 is connected to the disk drive 1100. For example, a removable storage medium such as a magnetic disk or an optical disk is inserted into the disk drive 1100. The serial port interface 1050 is connected to a mouse 1051 and a keyboard 1052, for example. The video adapter 1060 is connected to the display 1061, for example.

ハードディスクドライブ1090は、例えば、OS1091、アプリケーションプログラム1092、プログラムモジュール1093、プログラムデータ1094を記憶する。すなわち、不要ファイル検出装置10の各処理を規定するプログラムは、コンピュータにより実行可能なコードが記述されたプログラムモジュール1093として実装される。プログラムモジュール1093は、例えばハードディスクドライブ1090に記憶される。例えば、装置における機能構成と同様の処理を実行するためのプログラムモジュール1093が、ハードディスクドライブ1090に記憶される。なお、ハードディスクドライブ1090は、SSD(Solid State Drive)により代替されてもよい。   The hard disk drive 1090 stores, for example, an OS 1091, an application program 1092, a program module 1093, and program data 1094. That is, a program that defines each process of the unnecessary file detection apparatus 10 is implemented as a program module 1093 in which a code executable by a computer is described. The program module 1093 is stored in the hard disk drive 1090, for example. For example, a program module 1093 for executing processing similar to the functional configuration in the apparatus is stored in the hard disk drive 1090. The hard disk drive 1090 may be replaced by an SSD (Solid State Drive).

また、上述した実施の形態の処理で用いられるデータは、プログラムデータ1094として、例えばメモリ1010やハードディスクドライブ1090に記憶される。そして、CPU1020が、メモリ1010やハードディスクドライブ1090に記憶されたプログラムモジュール1093やプログラムデータ1094を必要に応じてRAM1012に読み出して実行する。   Data used in the processing of the above-described embodiment is stored as program data 1094 in, for example, the memory 1010 or the hard disk drive 1090. Then, the CPU 1020 reads the program module 1093 and the program data 1094 stored in the memory 1010 and the hard disk drive 1090 to the RAM 1012 and executes them as necessary.

なお、プログラムモジュール1093やプログラムデータ1094は、ハードディスクドライブ1090に記憶される場合に限らず、例えば着脱可能な記憶媒体に記憶され、ディスクドライブ1100等を介してCPU1020によって読み出されてもよい。あるいは、プログラムモジュール1093及びプログラムデータ1094は、ネットワーク、WANを介して接続された他のコンピュータに記憶されてもよい。そして、プログラムモジュール1093及びプログラムデータ1094は、他のコンピュータから、ネットワークインタフェース1070を介してCPU1020によって読み出されてもよい。   The program module 1093 and the program data 1094 are not limited to being stored in the hard disk drive 1090, but may be stored in, for example, a removable storage medium and read out by the CPU 1020 via the disk drive 1100 or the like. Alternatively, the program module 1093 and the program data 1094 may be stored in another computer connected via a network or a WAN. Then, the program module 1093 and the program data 1094 may be read by the CPU 1020 from another computer via the network interface 1070.

10 不要ファイル検出装置
11 通信処理部
12 入力部
13 出力部
14 制御部
14a 作成部
14b 検出部
14c 提示部
15 記憶部
15a 不要ファイル情報記憶部
20 配信サーバ
30A、30B エッジ端末
DESCRIPTION OF SYMBOLS 10 Unnecessary file detection apparatus 11 Communication processing part 12 Input part 13 Output part 14 Control part 14a Creation part 14b Detection part 14c Presentation part 15 Storage part 15a Unnecessary file information storage part 20 Distribution server 30A, 30B Edge terminal

Claims (5)

アプリケーションの動作の元となるコンテナイメージをレイヤごとに定義するイメージ定義ファイルを用いてイメージファイルを作成し、該イメージファイルから前記レイヤの情報を削除した実行時ファイルシステムを作成する作成部と、
前記作成部によって作成された実行時ファイルシステムの内容と、前記イメージ定義ファイルにおける各レイヤのファイルシステムの内容とを比較し、前記各レイヤのファイルシステムにおいて前記実行時ファイルシステムに含まれないファイルをそれぞれ検出する検出部と
を有することを特徴とする不要ファイル検出装置。
An image file is created using an image definition file that defines a container image for application operation for each layer, and a creation unit that creates a runtime file system in which the layer information is deleted from the image file;
The contents of the runtime file system created by the creating unit and the contents of the file system of each layer in the image definition file are compared, and files not included in the runtime file system in the file system of each layer are compared. An unnecessary file detection apparatus comprising: a detection unit that detects each of the detection units.
前記検出部によって検出されたファイルを不要ファイルとして提示する提示部をさらに有することを特徴とする請求項1に記載の不要ファイル検出装置。   The unnecessary file detection apparatus according to claim 1, further comprising a presentation unit that presents the file detected by the detection unit as an unnecessary file. 前記検出部は、前記イメージ定義ファイルにおける最下位のレイヤから最上位のレイヤまで、前記実行時ファイルシステムの内容と前記各レイヤのファイルシステムの内容とを順次比較し、前記各レイヤのファイルシステムにおいて前記実行時ファイルシステムに含まれないファイルをそれぞれ検出することを特徴とする請求項1に記載の不要ファイル検出装置。   The detection unit sequentially compares the contents of the runtime file system with the contents of the file system of each layer from the lowest layer to the highest layer in the image definition file, and the file system of each layer The unnecessary file detection device according to claim 1, wherein each of the files not included in the runtime file system is detected. 不要ファイル検出装置によって実行される不要ファイル検出方法であって、
アプリケーションの動作の元となるコンテナイメージをレイヤごとに定義するイメージ定義ファイルを用いてイメージファイルを作成し、該イメージファイルから前記レイヤの情報を削除した実行時ファイルシステムを作成する作成工程と、
前記作成工程によって作成された実行時ファイルシステムの内容と、前記イメージ定義ファイルにおける各レイヤのファイルシステムの内容とを比較し、前記各レイヤのファイルシステムにおいて前記実行時ファイルシステムに含まれないファイルをそれぞれ検出する検出工程と
を含んだことを特徴とする不要ファイル検出方法。
An unnecessary file detection method executed by an unnecessary file detection device,
Creating an image file using an image definition file that defines a container image for each operation of the application for each layer, and creating a runtime file system in which the layer information is deleted from the image file;
The contents of the runtime file system created by the creation step are compared with the contents of the file system of each layer in the image definition file, and files that are not included in the runtime file system in the file system of each layer An unnecessary file detection method comprising: a detection step for detecting each of them.
アプリケーションの動作の元となるコンテナイメージをレイヤごとに定義するイメージ定義ファイルを用いてイメージファイルを作成し、該イメージファイルから前記レイヤの情報を削除した実行時ファイルシステムを作成する作成ステップと、
前記作成ステップによって作成された実行時ファイルシステムの内容と、前記イメージ定義ファイルにおける各レイヤのファイルシステムの内容とを比較し、前記各レイヤのファイルシステムにおいて前記実行時ファイルシステムに含まれないファイルをそれぞれ検出する検出ステップと
をコンピュータに実行させるための不要ファイル検出プログラム。
Creating an image file using an image definition file that defines a container image that is a source of application operation for each layer, and creating a runtime file system in which the layer information is deleted from the image file;
The contents of the runtime file system created by the creating step are compared with the contents of the file system of each layer in the image definition file, and files that are not included in the runtime file system in the file system of each layer An unnecessary file detection program for causing a computer to execute a detection step for detecting each of them.
JP2017146979A 2017-07-28 2017-07-28 Unnecessary file detection device, unnecessary file detection method and unnecessary file detection program Active JP6581155B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2017146979A JP6581155B2 (en) 2017-07-28 2017-07-28 Unnecessary file detection device, unnecessary file detection method and unnecessary file detection program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2017146979A JP6581155B2 (en) 2017-07-28 2017-07-28 Unnecessary file detection device, unnecessary file detection method and unnecessary file detection program

Publications (2)

Publication Number Publication Date
JP2019028689A JP2019028689A (en) 2019-02-21
JP6581155B2 true JP6581155B2 (en) 2019-09-25

Family

ID=65478644

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2017146979A Active JP6581155B2 (en) 2017-07-28 2017-07-28 Unnecessary file detection device, unnecessary file detection method and unnecessary file detection program

Country Status (1)

Country Link
JP (1) JP6581155B2 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10824752B2 (en) * 2018-10-16 2020-11-03 Accenture Global Solutions Limited Utilizing heuristic and machine learning models to generate a mandatory access control policy for an application
US10936725B2 (en) * 2018-10-17 2021-03-02 Accenture Global Solutions Limited Container image vulnerability reduction

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7559059B2 (en) * 2001-09-21 2009-07-07 Bea Systems, Inc. Method and apparatus for smart directories for application deployment
JP6143476B2 (en) * 2013-01-30 2017-06-07 キヤノン株式会社 Application processing apparatus, method, and program thereof
JP2015210769A (en) * 2014-04-30 2015-11-24 キヤノン株式会社 Information processing device, information processing method, and program
US9965261B2 (en) * 2015-08-18 2018-05-08 International Business Machines Corporation Dependency-based container deployment

Also Published As

Publication number Publication date
JP2019028689A (en) 2019-02-21

Similar Documents

Publication Publication Date Title
US11290534B2 (en) System and method for scheduling computer tasks
US11138030B2 (en) Executing code referenced from a microservice registry
CN110199271B (en) Method and apparatus for field programmable gate array virtualization
US9304815B1 (en) Dynamic replica failure detection and healing
US9965331B2 (en) System and method for runtime grouping of processing elements in streaming applications
US11159393B1 (en) System and method of unifying and deploying a microservice-based application platform
BR112017005646B1 (en) COMPOSITE PARTITION FUNCTIONS
US20150363195A1 (en) Software package management
KR102156439B1 (en) Cloud-edge system and method for processing data thereof
CN110249312B (en) Method and system for converting data integration jobs from a source framework to a target framework
US9535743B2 (en) Data processing control method, computer-readable recording medium, and data processing control device for performing a Mapreduce process
US9934021B2 (en) System and method for adaptive application self-updating
JP6666310B2 (en) Delivery data creation device, delivery data creation method, and delivery data creation program
CN106462442B (en) System and method for loading virtual machine
JP6581155B2 (en) Unnecessary file detection device, unnecessary file detection method and unnecessary file detection program
EP3872624B1 (en) Information processing device, information processing system, and information processing method
JP6930862B2 (en) Client tampering judgment system and method
US10642580B1 (en) Simplifying and reusing visual programming graphs
US20180341475A1 (en) Just In Time Deployment with Package Managers
JP6676590B2 (en) Layer optimization device, layer optimization method, and layer optimization program
US10678515B1 (en) Simplifying and reusing visual programming graphs
US10200242B2 (en) System and method to replicate server configurations across systems using sticky attributions
US9462058B1 (en) Data locality in data integration applications
US20230325169A1 (en) Rebasing image layers utilising a repository-based strategy
US20230334007A1 (en) Data flow control device, data flow control method, and data flow control program

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20181106

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20190726

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20190827

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20190829

R150 Certificate of patent or registration of utility model

Ref document number: 6581155

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150