Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


In this Discussion

Persistent storage with docker
New on LowEndTalk? Please Register and read our Community Rules.

All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.

Persistent storage with docker

dwtbfdwtbf Member

How do I do? I setup ghost blog, but read there's a way to persist storage in shared folder, but I don't get how it's done, could someone explain like I'm 5?

Comments

  • You can either mount a local directory or let docker create a new volume, which is like a directory but managed by docker.

    docker run -v /local/path:/container/path imagename
    

    This will mount the /local/path at /container/path.

    docker run -v foo:/container/path imagename
    

    This will create a new volume named foo and mount it at /container/path.

    All of this is documented at https://docs.docker.com/engine/tutorials/dockervolumes/

    If you're using the offical ghost image, the correct path to mount in the container would be /var/lib/ghost.

Sign In or Register to comment.