Skip to content

Commit

Permalink
Limit locale changes to ubi8 container
Browse files Browse the repository at this point in the history
  • Loading branch information
robbavey authored and elasticsearch-bot committed Aug 20, 2020
1 parent ec2514d commit dd4ab61
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions docker/templates/Dockerfile.j2
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,12 @@
{% if image_flavor == 'ubi8' -%}
{% set base_image = 'registry.access.redhat.com/ubi8/ubi-minimal' -%}
{% set package_manager = 'microdnf' -%}
# Minimal distributions do not ship with en language packs.
{% set locale = 'C.UTF-8' -%}
{% else -%}
{% set base_image = 'centos:7' -%}
{% set package_manager = 'yum' -%}
{% set locale = 'en_US.UTF-8' -%}
{% endif -%}

FROM {{ base_image }}
Expand Down Expand Up @@ -62,9 +65,8 @@ ADD config/log4j2.properties config/
ADD pipeline/default.conf pipeline/logstash.conf
RUN chown --recursive logstash:root config/ pipeline/

# Ensure Logstash gets a UTF-8 locale by default.
# Minimal distributions do not ship with en language packs.
ENV LANG='C.UTF-8' LC_ALL='C.UTF-8'
# Ensure Logstash gets the correct locale by default.
ENV LANG={{ locale }} LC_ALL={{ locale }}

# Place the startup wrapper script.
ADD bin/docker-entrypoint /usr/local/bin/
Expand Down

0 comments on commit dd4ab61

Please sign in to comment.