From 4b950542af5d96e743a4a7e44c9e6539300c16c5 Mon Sep 17 00:00:00 2001 From: Rob Bavey Date: Wed, 17 Feb 2021 16:24:34 -0500 Subject: [PATCH] Update dockerfile with locale --- .ci/Dockerfile | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 .ci/Dockerfile diff --git a/.ci/Dockerfile b/.ci/Dockerfile new file mode 100644 index 0000000..26e666e --- /dev/null +++ b/.ci/Dockerfile @@ -0,0 +1,27 @@ +ARG ELASTIC_STACK_VERSION +ARG DISTRIBUTION_SUFFIX +FROM docker.elastic.co/logstash/logstash${DISTRIBUTION_SUFFIX}:${ELASTIC_STACK_VERSION} +RUN locale +RUN locale -a +RUN localectl set-locale LANG=en_US.UTF-8 +USER logstash +#ENV LANG=C.UTF-8 LC_ALL=C.UTF-8 LANGUAGE=C.UTF-8 +COPY --chown=logstash:logstash Gemfile /usr/share/plugins/plugin/Gemfile +COPY --chown=logstash:logstash *.gemspec VERSION* version* /usr/share/plugins/plugin/ +RUN cp /usr/share/logstash/logstash-core/versions-gem-copy.yml /usr/share/logstash/versions.yml +# NOTE: since 8.0 JDK is bundled as part of the LS distribution under $LS_HOME/jdk +ENV PATH="${PATH}:/usr/share/logstash/vendor/jruby/bin:/usr/share/logstash/jdk/bin" +ENV LOGSTASH_SOURCE="1" +ENV ELASTIC_STACK_VERSION=$ELASTIC_STACK_VERSION +# DISTRIBUTION="default" (by default) or "oss" +ARG DISTRIBUTION +ENV DISTRIBUTION=$DISTRIBUTION +# INTEGRATION="true" while integration testing (false-y by default) +ARG INTEGRATION +ENV INTEGRATION=$INTEGRATION +RUN gem install bundler -v '< 2' +WORKDIR /usr/share/plugins/plugin +RUN bundle install --with test ci +COPY --chown=logstash:logstash . /usr/share/plugins/plugin +RUN bundle exec rake vendor +RUN .ci/setup.sh