Skip to content

Docker entrypoint is inefficient with disk space #260

@junkiebev

Description

@junkiebev

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions