Podman and SELinux compatible volume declaration (#639)

This commit is contained in:
Yuri Pereira Constante 2021-11-29 05:28:17 -03:00 committed by GitHub
parent e6f9ec49d2
commit 01a0cf94d5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 30 deletions

View File

@ -44,7 +44,6 @@ own_. [sherifabdlnaby/elastdocker][elastdocker] is one example among others of p
1. [Requirements](#requirements) 1. [Requirements](#requirements)
* [Host setup](#host-setup) * [Host setup](#host-setup)
* [SELinux](#selinux)
* [Docker Desktop](#docker-desktop) * [Docker Desktop](#docker-desktop)
* [Windows](#windows) * [Windows](#windows)
* [macOS](#macos) * [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 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].** 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 ### Docker Desktop
#### Windows #### Windows

View File

@ -7,13 +7,8 @@ services:
args: args:
ELK_VERSION: $ELK_VERSION ELK_VERSION: $ELK_VERSION
volumes: volumes:
- type: bind - ./elasticsearch/config/elasticsearch.yml:/usr/share/elasticsearch/config/elasticsearch.yml:ro,z
source: ./elasticsearch/config/elasticsearch.yml - elasticsearch:/usr/share/elasticsearch/data:z
target: /usr/share/elasticsearch/config/elasticsearch.yml
read_only: true
- type: volume
source: elasticsearch
target: /usr/share/elasticsearch/data
ports: ports:
- "9200:9200" - "9200:9200"
- "9300:9300" - "9300:9300"
@ -32,14 +27,8 @@ services:
args: args:
ELK_VERSION: $ELK_VERSION ELK_VERSION: $ELK_VERSION
volumes: volumes:
- type: bind - ./logstash/config/logstash.yml:/usr/share/logstash/config/logstash.yml:ro,z
source: ./logstash/config/logstash.yml - ./logstash/pipeline:/usr/share/logstash/pipeline:ro,z
target: /usr/share/logstash/config/logstash.yml
read_only: true
- type: bind
source: ./logstash/pipeline
target: /usr/share/logstash/pipeline
read_only: true
ports: ports:
- "5044:5044" - "5044:5044"
- "5000:5000/tcp" - "5000:5000/tcp"
@ -58,10 +47,7 @@ services:
args: args:
ELK_VERSION: $ELK_VERSION ELK_VERSION: $ELK_VERSION
volumes: volumes:
- type: bind - ./kibana/config/kibana.yml:/usr/share/kibana/config/kibana.yml:ro,z
source: ./kibana/config/kibana.yml
target: /usr/share/kibana/config/kibana.yml
read_only: true
ports: ports:
- "5601:5601" - "5601:5601"
networks: networks: