Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Docker entrypoint is inefficient with disk space #260

Open
junkiebev opened this issue Sep 22, 2023 · 1 comment
Open

Docker entrypoint is inefficient with disk space #260

junkiebev opened this issue Sep 22, 2023 · 1 comment
Labels

Comments

@junkiebev
Copy link

https://github.com/Graylog2/graylog-docker/blob/5da05dfaae6f98929297acf1c19209a447d73ecf/docker-entrypoint.sh#L69C1-L73C109

these lines merge the plugins into one directory, which gets referenced

# 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.

@kroepke
Copy link
Member

kroepke commented Sep 25, 2023

Go go go :)

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants