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:

  • How to set busybox vi auto wrap when a line too long?
  • Running elasticsearch in docker
  • Port forwarding in docker-machine?
  • AWS ECS weird docker behavior
  • AWS Elastic Beanstalk Docker deployment failed
  • Letsencrypt + Docker + Nginx
  • 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?

  • How to use docker in a gitlab-ci job?
  • Docker build tag repository name
  • GC overhead limit exceeded in Docker when trying to build project by sbt
  • How to assign a host port to container port using docker if container is already created and running?
  • docker swarm certificate expiry
  • MySQL import hangs on Vagrant CoreOS box on Mac
  • 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.