Elastic/elasticsearch-docker not assigning permissions to data directory on run

You can use a bind-mount for your specific use case, just ensure that the directory has such permissions that the elasticsearch user can write in it. Either tune your host OS mount parameters to ensure the external dir is writable when bind-mounted inside the container by the elasticsearch user or just create a subdir inside this external mount point owned by 1000:1000 using that instead.

In the Docker issue that you linked there is also mention of a method to create a named volume reflecting a host dir https://github.com/docker/docker/issues/19990#issuecomment-248955005, but, as in the case of a bind-mount, the files will also retain the uid:gid and permissions of your host dir, so you'll need to address that.

Finally since you mentioned cloud usage, depending on the vendor, you may consider an alternative storage driver: a few open source projects include GitHub - rexray/rexray: REX-Ray is a container storage orchestration engine enabling persistence for cloud native workloads and KING138 ## Situs Penyedia Pragmatic Play PG Soft dan No Limit City Terlengkap.