mirror of
https://github.com/vimagick/dockerfiles.git
synced 2026-01-02 19:17:33 +01:00
add elasticsearch-arm
This commit is contained in:
25
elk/arm/elasticsearch/docker-entrypoint.sh
Executable file
25
elk/arm/elasticsearch/docker-entrypoint.sh
Executable file
@@ -0,0 +1,25 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
export PATH=/opt/elasticsearch/bin:$PATH
|
||||
|
||||
# Add elasticsearch as command if needed
|
||||
if [ "${1:0:1}" = '-' ]; then
|
||||
set -- elasticsearch "$@"
|
||||
fi
|
||||
|
||||
# Drop root privileges if we are running elasticsearch
|
||||
# allow the container to be started with `--user`
|
||||
if [ "$1" = 'elasticsearch' -a "$(id -u)" = '0' ]; then
|
||||
# Change the ownership of /opt/elasticsearch/data to elasticsearch
|
||||
chown -R elasticsearch:elasticsearch /opt/elasticsearch/data
|
||||
|
||||
set -- gosu elasticsearch "$@"
|
||||
#exec gosu elasticsearch "$BASH_SOURCE" "$@"
|
||||
fi
|
||||
|
||||
# As argument is not related to elasticsearch,
|
||||
# then assume that user wants to run his own process,
|
||||
# for example a `bash` shell to explore this image
|
||||
exec "$@"
|
||||
Reference in New Issue
Block a user