Skip to content
This repository was archived by the owner on Aug 5, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions 1.5/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,15 @@ ENV PATH /opt/logstash/bin:$PATH
# necessary for 5.0+ (overriden via "--path.settings", ignored by < 5.0)
ENV LS_SETTINGS_DIR /etc/logstash
# comment out some troublesome configuration parameters
# path.log: logs should go to stdout
# path.config: No config files found: /etc/logstash/conf.d/*
RUN set -ex \
&& if [ -f "$LS_SETTINGS_DIR/logstash.yml" ]; then \
sed -ri 's!^(path.log|path.config):!#&!g' "$LS_SETTINGS_DIR/logstash.yml"; \
RUN set -ex; \
if [ -f "$LS_SETTINGS_DIR/logstash.yml" ]; then \
sed -ri 's!^path\.config:!#&!g' "$LS_SETTINGS_DIR/logstash.yml"; \
fi; \
# if the "log4j2.properties" file exists (logstash 5.x), let's empty it out so we get the default: "logging only errors to the console"
if [ -f "$LS_SETTINGS_DIR/log4j2.properties" ]; then \
cp "$LS_SETTINGS_DIR/log4j2.properties" "$LS_SETTINGS_DIR/log4j2.properties.dist"; \
truncate --size=0 "$LS_SETTINGS_DIR/log4j2.properties"; \
fi

COPY docker-entrypoint.sh /
Expand Down
12 changes: 8 additions & 4 deletions 2.0/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,15 @@ ENV PATH /opt/logstash/bin:$PATH
# necessary for 5.0+ (overriden via "--path.settings", ignored by < 5.0)
ENV LS_SETTINGS_DIR /etc/logstash
# comment out some troublesome configuration parameters
# path.log: logs should go to stdout
# path.config: No config files found: /etc/logstash/conf.d/*
RUN set -ex \
&& if [ -f "$LS_SETTINGS_DIR/logstash.yml" ]; then \
sed -ri 's!^(path.log|path.config):!#&!g' "$LS_SETTINGS_DIR/logstash.yml"; \
RUN set -ex; \
if [ -f "$LS_SETTINGS_DIR/logstash.yml" ]; then \
sed -ri 's!^path\.config:!#&!g' "$LS_SETTINGS_DIR/logstash.yml"; \
fi; \
# if the "log4j2.properties" file exists (logstash 5.x), let's empty it out so we get the default: "logging only errors to the console"
if [ -f "$LS_SETTINGS_DIR/log4j2.properties" ]; then \
cp "$LS_SETTINGS_DIR/log4j2.properties" "$LS_SETTINGS_DIR/log4j2.properties.dist"; \
truncate --size=0 "$LS_SETTINGS_DIR/log4j2.properties"; \
fi

COPY docker-entrypoint.sh /
Expand Down
12 changes: 8 additions & 4 deletions 2.1/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,15 @@ ENV PATH /opt/logstash/bin:$PATH
# necessary for 5.0+ (overriden via "--path.settings", ignored by < 5.0)
ENV LS_SETTINGS_DIR /etc/logstash
# comment out some troublesome configuration parameters
# path.log: logs should go to stdout
# path.config: No config files found: /etc/logstash/conf.d/*
RUN set -ex \
&& if [ -f "$LS_SETTINGS_DIR/logstash.yml" ]; then \
sed -ri 's!^(path.log|path.config):!#&!g' "$LS_SETTINGS_DIR/logstash.yml"; \
RUN set -ex; \
if [ -f "$LS_SETTINGS_DIR/logstash.yml" ]; then \
sed -ri 's!^path\.config:!#&!g' "$LS_SETTINGS_DIR/logstash.yml"; \
fi; \
# if the "log4j2.properties" file exists (logstash 5.x), let's empty it out so we get the default: "logging only errors to the console"
if [ -f "$LS_SETTINGS_DIR/log4j2.properties" ]; then \
cp "$LS_SETTINGS_DIR/log4j2.properties" "$LS_SETTINGS_DIR/log4j2.properties.dist"; \
truncate --size=0 "$LS_SETTINGS_DIR/log4j2.properties"; \
fi

COPY docker-entrypoint.sh /
Expand Down
12 changes: 8 additions & 4 deletions 2.2/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,15 @@ ENV PATH /opt/logstash/bin:$PATH
# necessary for 5.0+ (overriden via "--path.settings", ignored by < 5.0)
ENV LS_SETTINGS_DIR /etc/logstash
# comment out some troublesome configuration parameters
# path.log: logs should go to stdout
# path.config: No config files found: /etc/logstash/conf.d/*
RUN set -ex \
&& if [ -f "$LS_SETTINGS_DIR/logstash.yml" ]; then \
sed -ri 's!^(path.log|path.config):!#&!g' "$LS_SETTINGS_DIR/logstash.yml"; \
RUN set -ex; \
if [ -f "$LS_SETTINGS_DIR/logstash.yml" ]; then \
sed -ri 's!^path\.config:!#&!g' "$LS_SETTINGS_DIR/logstash.yml"; \
fi; \
# if the "log4j2.properties" file exists (logstash 5.x), let's empty it out so we get the default: "logging only errors to the console"
if [ -f "$LS_SETTINGS_DIR/log4j2.properties" ]; then \
cp "$LS_SETTINGS_DIR/log4j2.properties" "$LS_SETTINGS_DIR/log4j2.properties.dist"; \
truncate --size=0 "$LS_SETTINGS_DIR/log4j2.properties"; \
fi

COPY docker-entrypoint.sh /
Expand Down
12 changes: 8 additions & 4 deletions 2.3/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,15 @@ ENV PATH /opt/logstash/bin:$PATH
# necessary for 5.0+ (overriden via "--path.settings", ignored by < 5.0)
ENV LS_SETTINGS_DIR /etc/logstash
# comment out some troublesome configuration parameters
# path.log: logs should go to stdout
# path.config: No config files found: /etc/logstash/conf.d/*
RUN set -ex \
&& if [ -f "$LS_SETTINGS_DIR/logstash.yml" ]; then \
sed -ri 's!^(path.log|path.config):!#&!g' "$LS_SETTINGS_DIR/logstash.yml"; \
RUN set -ex; \
if [ -f "$LS_SETTINGS_DIR/logstash.yml" ]; then \
sed -ri 's!^path\.config:!#&!g' "$LS_SETTINGS_DIR/logstash.yml"; \
fi; \
# if the "log4j2.properties" file exists (logstash 5.x), let's empty it out so we get the default: "logging only errors to the console"
if [ -f "$LS_SETTINGS_DIR/log4j2.properties" ]; then \
cp "$LS_SETTINGS_DIR/log4j2.properties" "$LS_SETTINGS_DIR/log4j2.properties.dist"; \
truncate --size=0 "$LS_SETTINGS_DIR/log4j2.properties"; \
fi

COPY docker-entrypoint.sh /
Expand Down
12 changes: 8 additions & 4 deletions 2.4/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,15 @@ ENV PATH /opt/logstash/bin:$PATH
# necessary for 5.0+ (overriden via "--path.settings", ignored by < 5.0)
ENV LS_SETTINGS_DIR /etc/logstash
# comment out some troublesome configuration parameters
# path.log: logs should go to stdout
# path.config: No config files found: /etc/logstash/conf.d/*
RUN set -ex \
&& if [ -f "$LS_SETTINGS_DIR/logstash.yml" ]; then \
sed -ri 's!^(path.log|path.config):!#&!g' "$LS_SETTINGS_DIR/logstash.yml"; \
RUN set -ex; \
if [ -f "$LS_SETTINGS_DIR/logstash.yml" ]; then \
sed -ri 's!^path\.config:!#&!g' "$LS_SETTINGS_DIR/logstash.yml"; \
fi; \
# if the "log4j2.properties" file exists (logstash 5.x), let's empty it out so we get the default: "logging only errors to the console"
if [ -f "$LS_SETTINGS_DIR/log4j2.properties" ]; then \
cp "$LS_SETTINGS_DIR/log4j2.properties" "$LS_SETTINGS_DIR/log4j2.properties.dist"; \
truncate --size=0 "$LS_SETTINGS_DIR/log4j2.properties"; \
fi

COPY docker-entrypoint.sh /
Expand Down
12 changes: 8 additions & 4 deletions 5.0/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,15 @@ ENV PATH /usr/share/logstash/bin:$PATH
# necessary for 5.0+ (overriden via "--path.settings", ignored by < 5.0)
ENV LS_SETTINGS_DIR /etc/logstash
# comment out some troublesome configuration parameters
# path.log: logs should go to stdout
# path.config: No config files found: /etc/logstash/conf.d/*
RUN set -ex \
&& if [ -f "$LS_SETTINGS_DIR/logstash.yml" ]; then \
sed -ri 's!^(path.log|path.config):!#&!g' "$LS_SETTINGS_DIR/logstash.yml"; \
RUN set -ex; \
if [ -f "$LS_SETTINGS_DIR/logstash.yml" ]; then \
sed -ri 's!^path\.config:!#&!g' "$LS_SETTINGS_DIR/logstash.yml"; \
fi; \
# if the "log4j2.properties" file exists (logstash 5.x), let's empty it out so we get the default: "logging only errors to the console"
if [ -f "$LS_SETTINGS_DIR/log4j2.properties" ]; then \
cp "$LS_SETTINGS_DIR/log4j2.properties" "$LS_SETTINGS_DIR/log4j2.properties.dist"; \
truncate --size=0 "$LS_SETTINGS_DIR/log4j2.properties"; \
fi

COPY docker-entrypoint.sh /
Expand Down
12 changes: 8 additions & 4 deletions Dockerfile.template
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,15 @@ ENV PATH %%LOGSTASH_PATH%%:$PATH
# necessary for 5.0+ (overriden via "--path.settings", ignored by < 5.0)
ENV LS_SETTINGS_DIR /etc/logstash
# comment out some troublesome configuration parameters
# path.log: logs should go to stdout
# path.config: No config files found: /etc/logstash/conf.d/*
RUN set -ex \
&& if [ -f "$LS_SETTINGS_DIR/logstash.yml" ]; then \
sed -ri 's!^(path.log|path.config):!#&!g' "$LS_SETTINGS_DIR/logstash.yml"; \
RUN set -ex; \
if [ -f "$LS_SETTINGS_DIR/logstash.yml" ]; then \
sed -ri 's!^path\.config:!#&!g' "$LS_SETTINGS_DIR/logstash.yml"; \
fi; \
# if the "log4j2.properties" file exists (logstash 5.x), let's empty it out so we get the default: "logging only errors to the console"
if [ -f "$LS_SETTINGS_DIR/log4j2.properties" ]; then \
cp "$LS_SETTINGS_DIR/log4j2.properties" "$LS_SETTINGS_DIR/log4j2.properties.dist"; \
truncate --size=0 "$LS_SETTINGS_DIR/log4j2.properties"; \
fi

COPY docker-entrypoint.sh /
Expand Down