mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-09-20 00:30:49 +00:00
Run clickhouse-server in exec form
This commit is contained in:
parent
a7d75c527b
commit
0dd5777c1c
@ -39,4 +39,3 @@ ENV CLICKHOUSE_CONFIG /etc/clickhouse-server/config.xml
|
||||
|
||||
ENTRYPOINT ["/entrypoint.sh"]
|
||||
|
||||
CMD /usr/bin/clickhouse-server --config=${CLICKHOUSE_CONFIG}
|
||||
|
@ -30,5 +30,11 @@ chown -R $USER:$GROUP \
|
||||
"$TMP_DIR" \
|
||||
"$USER_PATH"
|
||||
|
||||
# execute CMD
|
||||
exec gosu clickhouse "$@"
|
||||
|
||||
# if no args passed to `docker run` or first argument start with `--`, then the user is passing clickhouse-server arguments
|
||||
if [[ $# -lt 1 ]] || [[ "$1" == "--"* ]]; then
|
||||
exec gosu clickhouse /usr/bin/clickhouse-server --config-file=$CLICKHOUSE_CONFIG "$@"
|
||||
fi
|
||||
|
||||
# Otherwise, we assume the user want to run his own process, for example a `bash` shell to explore this image
|
||||
exec "$@"
|
||||
|
Loading…
Reference in New Issue
Block a user