I don't know the specifics of your app, but Docker containers aren't designed to be used for persistent data. They are designed to be immutable after they're built.
Instead you would create a volume to keep files in and mount them where your application needs them. Typically like /data or /var/something. (Edit: otter wiki wants /app-data)
You can use a bind mount to mount a local directory or a named volume which is kept in a set location by Docker. Generally bind mounts are easier to start with since you can browse the files directly on the host.
all 12 comments