how could I add user permission parameter into docker-compose

I want to adapt this command into docker-compose.yml

docker run -d -v /Users/eric/workspace/apache-spark-playground/es_datastore:/usr/share/elasticsearch/data --user 1000:50 elasticsearch:2.1.1

  • Intergration of Docker with OpenStack via Docker Heat Plugin
  • File locks support in Docker volumes of NFS4 shares
  • How to remove Server list of Docker(Project Interpreter) on Pycharm
  • postgres $HOME directory unproperly set in Docker container created from official postgres Dockerfile
  • Pushing a docker image into Artifactory via the publishing mechanism in gradle
  • How to use the “Remote Systems” view in Eclipse to explore a Docker container file system?
  • How should I modify the following yaml sample

    elasticsearch:
      image: elasticsearch:2.1.1
      hostname: elasticsearch
      ports:
        - "9200:9200"
      volumes:
        - ./es_datastore:/usr/share/elasticsearch/data
    

  • Unable to pull docker image, getting 'remote error: access denied'
  • Docker-compose migrating from links to networking MongoDB database issue
  • Kubernetes service-cluster-ip-range do not work for pod
  • How to configure /etc/hosts to test local Docker setup
  • Docker NPM Install Not working
  • Add your application to a Docker image
  • One Solution collect form web for “how could I add user permission parameter into docker-compose”

    According to the docker-compose docs this should work:

    user: 1000:50
    

    source

    Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.