0

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?

1 Answer 1

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

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.