From 01a0cf94d54398b33addef5e8d109dcd09646427 Mon Sep 17 00:00:00 2001 From: Yuri Pereira Constante Date: Mon, 29 Nov 2021 05:28:17 -0300 Subject: [PATCH] Podman and SELinux compatible volume declaration (#639) --- README.md | 11 ----------- docker-compose.yml | 24 +++++------------------- 2 files changed, 5 insertions(+), 30 deletions(-) diff --git a/README.md b/README.md index 1954db9..dd43be9 100644 --- a/README.md +++ b/README.md @@ -44,7 +44,6 @@ own_. [sherifabdlnaby/elastdocker][elastdocker] is one example among others of p 1. [Requirements](#requirements) * [Host setup](#host-setup) - * [SELinux](#selinux) * [Docker Desktop](#docker-desktop) * [Windows](#windows) * [macOS](#macos) @@ -97,16 +96,6 @@ By default, the stack exposes the following ports: Elastic stack in development environments. For production setups, we recommend users to set up their host according to the instructions from the Elasticsearch documentation: [Important System Configuration][es-sys-config].** -### SELinux - -On distributions which have SELinux enabled out-of-the-box you will need to either re-context the files or set SELinux -into Permissive mode in order for docker-elk to start properly. For example on Redhat and CentOS, the following will -apply the proper context: - -```console -$ chcon -R system_u:object_r:admin_home_t:s0 docker-elk/ -``` - ### Docker Desktop #### Windows diff --git a/docker-compose.yml b/docker-compose.yml index 669e337..c7429e5 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -7,13 +7,8 @@ services: args: ELK_VERSION: $ELK_VERSION volumes: - - type: bind - source: ./elasticsearch/config/elasticsearch.yml - target: /usr/share/elasticsearch/config/elasticsearch.yml - read_only: true - - type: volume - source: elasticsearch - target: /usr/share/elasticsearch/data + - ./elasticsearch/config/elasticsearch.yml:/usr/share/elasticsearch/config/elasticsearch.yml:ro,z + - elasticsearch:/usr/share/elasticsearch/data:z ports: - "9200:9200" - "9300:9300" @@ -32,14 +27,8 @@ services: args: ELK_VERSION: $ELK_VERSION volumes: - - type: bind - source: ./logstash/config/logstash.yml - target: /usr/share/logstash/config/logstash.yml - read_only: true - - type: bind - source: ./logstash/pipeline - target: /usr/share/logstash/pipeline - read_only: true + - ./logstash/config/logstash.yml:/usr/share/logstash/config/logstash.yml:ro,z + - ./logstash/pipeline:/usr/share/logstash/pipeline:ro,z ports: - "5044:5044" - "5000:5000/tcp" @@ -58,10 +47,7 @@ services: args: ELK_VERSION: $ELK_VERSION volumes: - - type: bind - source: ./kibana/config/kibana.yml - target: /usr/share/kibana/config/kibana.yml - read_only: true + - ./kibana/config/kibana.yml:/usr/share/kibana/config/kibana.yml:ro,z ports: - "5601:5601" networks: