Graylog2 / Graylog2/graylog-docker
Docker entrypoint is inefficient with disk space
- Dominant language
- Shell
- Stars
- 435
- Forks
- 130
- PR merge metrics
- No merged PRs in 30d
Description
https://github.com/Graylog2/graylog-docker/blob/5da05dfaae6f98929297acf1c19209a447d73ecf/docker-entrypoint.sh#L69C1-L73C109
these lines merge the plugins into one directory, which gets referenced
```bash
# Merge plugin dirs to allow mounting of /plugin as a volume
export GRAYLOG_PLUGIN_DIR=${GRAYLOG_HOME}/plugins-merged
rm -f ${GRAYLOG_PLUGIN_DIR}/*
find ${GRAYLOG_HOME}/plugins-default/ -type f -exec cp {} ${GRAYLOG_PLUGIN_DIR}/ \;
find ${GRAYLOG_HOME}/plugin ! -readable -prune -o -type f -a -readable -exec cp {} ${GRAYLOG_PLUGIN_DIR}/ \;
```
using `cp` instead of `mv` makes the image >200mb fatter at run-time for no upside I can determine. I wouldn't mind kicking in a PR, but before doing so I was curious if that was a conscious choice for backwards compatibility.
Contributor guide
Assessment
This issue has not been assessed yet.