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

  • Using RSpec, Capyabra and Selenium (docker), on click method getting error: Connection refused
  • Difference Docker on bare metal and docker on ubuntu
  • Kubernetes v1.2.2 api-server dosen't start
  • Docker watchtower with private registry
  • docker login <dtr-server> gives error 404 not found
  • What are the benefits of using Docker for persistent data
  • 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
    

  • rabbitmq settings do not persist while running dockerfile
  • Can run ARM/rpi images in Docker on Windows but not linux
  • Docker 'WARNING: permission denied' on ubuntu
  • Cant connect to Mysql docker container from host
  • Loading Docker container in PyCharm
  • Unable to start docker container from arquillian cube on windows 10
  • 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.