dfimage | Reverse-engineer a Dockerfile from a Docker image | Continuous Deployment library
kandi X-RAY | dfimage Summary
kandi X-RAY | dfimage Summary
Reverse-engineer a Dockerfile from a Docker image.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Parse the history from the history
- Insert a new step
dfimage Key Features
dfimage Examples and Code Snippets
Community Discussions
Trending Discussions on dfimage
QUESTION
I have an image from a colleague and the original version of the Dockerfile was lost that was used to create it.
I used alpine/dfimage to rebuild everything in the Dockerfile except the first line (FROM).
According to Artifactory, the digest for the layer is
...ANSWER
Answered 2022-Feb-16 at 17:38So, I was able to find this, but none of the data I have seem to correlate and I'd welcome a discussion on it if there is, in fact, any correlating data.
The image of interest is alpine:3.11.6
with a digest of sha256:9a839e63dad54c3a6d1834e29692c8492d93f90c59c978c1ed79109ea4fb9a54
.
QUESTION
I have tried docker history
and dfimage
for getting the dockerfile from a docker image.
From what I can see, any information about the multistage dockerfiles is not there. As I think about it, it makes sense. The final docker image just knows that files were copied in. It probably does not keep a reference to the layer that was used to construct it.
But I thought I would ask just to be sure. (It would be really helpful)
For example: I have a multistage docker file that, in the first stage builds a dot.net core application, then in the second stage copies the files from that build into an Nginx container.
Is there any way, given the final image, to get the dockerfile used to do the build?
...ANSWER
Answered 2021-Mar-08 at 19:05No it is not possible. Docker image will only have its own history and not the multi stages that may have been used before it
QUESTION
I am trying to extract Dockerfile from Docker image.Taking look at a popular answer, I executed the following commands:
...ANSWER
Answered 2020-Nov-29 at 11:14Run with sudo
command.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install dfimage
You can use dfimage like any standard Python library. You will need to make sure that you have a development environment consisting of a Python distribution including header files, a compiler, pip, and git installed. Make sure that your pip, setuptools, and wheel are up to date. When using pip it is generally recommended to install packages in a virtual environment to avoid changes to the system.
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page