Docker Compose raise an AccessDeniedExpcetion

I’m trying to compose the ELK architecture by using docker compose. The following is the compose file:

version: '2'


    image: elasticsearch
      - ./elasticsearch/config:/usr/share/elasticsearch/config
      - ./elasticsearch/data:/usr/share/elasticsearch/data
      - ./elasticsearch/logs:/usr/share/elasticsearch/logs
    command: /bin/true

    image: elasticsearch
      - elasticsearch_assets:rw
      - elasticsearch_assets

And here folliwing a screenshot of the project structure:

  • docker-compose up via Windows bat file?
  • Jenkins: Don't want to trigger on Git Tag (No Workspace)
  • Persist data only for selected volumes with docker-compose
  • Linked docker containers can't communicate with each other
  • Equivalent of local host files for running Bluemix containers
  • PHPStorm debug application deployed using docker inside vagrant
  • enter image description here

    When I run docker-compose up I get the following error:

    Starting elkdocker_elasticsearch_assets_1
    Starting elkdocker_elasticsearch_1
    Attaching to elkdocker_elasticsearch_assets_1, elkdocker_elasticsearch_1
    elkdocker_elasticsearch_assets_1 exited with code 0
    elasticsearch_1        | [2016-03-22 01:28:59,939][WARN ][bootstrap                ] unable to install syscall filter: seccomp unavailable: your kernel is buggy and you should upgrade
    elasticsearch_1        | Exception in thread "main" java.lang.IllegalStateException: Unable to access 'path.scripts' (/usr/share/elasticsearch/config/scripts)
    elasticsearch_1        | Likely root cause: java.nio.file.AccessDeniedException: /usr/share/elasticsearch/config/scripts
    elasticsearch_1        |    at sun.nio.fs.UnixException.translateToIOException(
    elasticsearch_1        |    at sun.nio.fs.UnixException.rethrowAsIOException(
    elasticsearch_1        |    at sun.nio.fs.UnixException.rethrowAsIOException(
    elasticsearch_1        |    at sun.nio.fs.UnixFileSystemProvider.createDirectory(
    elasticsearch_1        |    at java.nio.file.Files.createDirectory(
    elasticsearch_1        |    at java.nio.file.Files.createAndCheckIsDirectory(
    elasticsearch_1        |    at java.nio.file.Files.createDirectories(
    elasticsearch_1        |    at org.elasticsearch.bootstrap.Security.ensureDirectoryExists(
    elasticsearch_1        |    at org.elasticsearch.bootstrap.Security.addPath(
    elasticsearch_1        |    at org.elasticsearch.bootstrap.Security.addFilePermissions(
    elasticsearch_1        |    at org.elasticsearch.bootstrap.Security.createPermissions(
    elasticsearch_1        |    at org.elasticsearch.bootstrap.Security.configure(
    elasticsearch_1        |    at org.elasticsearch.bootstrap.Bootstrap.setupSecurity(
    elasticsearch_1        |    at org.elasticsearch.bootstrap.Bootstrap.setup(
    elasticsearch_1        |    at org.elasticsearch.bootstrap.Bootstrap.init(
    elasticsearch_1        |    at org.elasticsearch.bootstrap.Elasticsearch.main(
    elasticsearch_1        | Refer to the log for complete error details.
    elkdocker_elasticsearch_1 exited with code 1

    Do you have any idea why?

  • Cannot create mongodb image on Docker
  • Matched between Docker container and Linux host?
  • Linkerd, k8s and routing
  • Docker-compose network link
  • Kubernetes Volume mountpath
  • How do I uninstall docker-compose?
  • One Solution collect form web for “Docker Compose raise an AccessDeniedExpcetion”

    regarding this error
    Unable to access ‘path.scripts’ error
    just create a sub folder called scripts under the config folder
    it will fix the error

    ./elasticsearch/config ==> mkdir ./elasticsearch/config/scripts

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