How the edit files in broken container

Sorry for my noob question.
I’m new in docker.
Setup docker for mac and Kitematic
Then download and run postgres official image
Then try to install powa extensions to postgres and broke it
Now i can’t start container, because “FATAL: could not access file “pg_stat_kcache”: No such file or directory”

I don’t understand how i can develop if i can’t do mistake(
Or i need commit after every step?

Somebody tell me please, thx