Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Split the Dockerfile by stage #767

Closed
ForgetMe17 opened this issue Jul 15, 2020 · 0 comments
Closed

Split the Dockerfile by stage #767

ForgetMe17 opened this issue Jul 15, 2020 · 0 comments

Comments

@ForgetMe17
Copy link
Contributor

Description
Given a dockerfile or dockerfile object, check if it is a multistage dockfile, if so, split it by the stage.

Implementation
Check From command in the dockerfile, and split by From.

References
Add function in tern\analyze\docker\dockerfile.py.

Super Issues
#612

ForgetMe17 added a commit to ForgetMe17/tern that referenced this issue Jul 18, 2020
Implemented two functions:
1. check_mutistage_dockerfile(): Given a dockerfile object, return if
it is a multistage dockerfile.
2. split_multistage_dockerfile(): Given a multistage dockerfile object,
return the splited dockerfile object list.

Works towards tern-tools#767.
Super issue tern-tools#612.

Signed-off-by: WangJL <hazard15020@gmail.com>
ForgetMe17 added a commit to ForgetMe17/tern that referenced this issue Aug 4, 2020
This commit add 3 functions in tern\analyze\docker\dockerfile.py。

1. check_multistage_dockerfile() to check if the given dockerfile is a
multistage dockerfile, return True or Flase and the index of FROM line.

2. get_multistage_image_dockerfiles() to split multistage dockerfile
into seperate dockerfiles for build.

3. write_dockerfile_by_structure() to write a dockerfile by the dfobj
structure.

Works towards tern-tools#767.
Super issue tern-tools#612.

Signed-off-by: WangJL <hazard15020@gmail.com>
ForgetMe17 added a commit to ForgetMe17/tern that referenced this issue Aug 12, 2020
This commit add 3 functions in tern\analyze\docker\dockerfile.py。

1. check_multistage_dockerfile() to check if the given dockerfile is a
multistage dockerfile, return True or Flase and the index of FROM line.

2. get_multistage_image_dockerfiles() to split multistage dockerfile
into seperate dockerfiles for build.

3. write_dockerfile_by_structure() to write a dockerfile by the dfobj
structure.

Works towards tern-tools#767.
Super issue tern-tools#612.

Signed-off-by: WangJL <hazard15020@gmail.com>
ForgetMe17 added a commit to ForgetMe17/tern that referenced this issue Aug 18, 2020
This commit add 3 functions in tern\analyze\docker\dockerfile.py。

1. check_multistage_dockerfile() to check if the given dockerfile is a
multistage dockerfile, return True or Flase and the index of FROM line.

2. get_multistage_image_dockerfiles() to split multistage dockerfile
into seperate dockerfiles for build.

3. write_dockerfile_by_structure() to write a dockerfile by the dfobj
structure.

Fixes tern-tools#767.

Signed-off-by: WangJL <hazard15020@gmail.com>
ForgetMe17 added a commit to ForgetMe17/tern that referenced this issue Aug 19, 2020
This commit add 3 functions in tern\analyze\docker\dockerfile.py。

1. check_multistage_dockerfile() to check if the given dockerfile is a
multistage dockerfile, return True or Flase and the index of FROM line.

2. get_multistage_image_dockerfiles() to split multistage dockerfile
into seperate dockerfiles for build.

3. write_dockerfile_by_structure() to write a dockerfile by the dfobj
structure.

Fixes tern-tools#767.

Signed-off-by: WangJL <hazard15020@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant