I accidentally deleted the Docker file for a container that is still running. Is there a way to view how the container was originally built?
Asked
Active
Viewed 266 times
1 Answers
1
If you copied all your files at build time and aren't .dockerignore
-ing Dockerfile, you might get lucky and be able to find it in the container. You can use docker exec {CONTAINER_NAME/ID} ls -al
or similar to do a quick check (you might need to change which directory based on where the files were copied and what the default working directory is).
Otherwise you can try docker history ...
or use a reverse-compile tool, see Docker: Reverse Engineering of an Image

hoverTech
- 56
- 4