Is there a simple way to edit an image? (just create/copy directory or file)

Hello.

I’m new to Docker (and Linux in general) and trying to build a project from someone else’s source. It launched, but an error popped up - a directory is missing.

I tried to create a directory, using “docker run -it sh” to launch an interactive shell and create a directory, but the directory that I created using mkdir vanished after I exited the image. Why? Is there a way to add the directory (or file for that matter), so I don’t have to build the project again (it’s Rails project, so it takes a while to install all gems)?