-
Notifications
You must be signed in to change notification settings - Fork 58
Expand file tree
/
Copy pathDockerfile
More file actions
31 lines (23 loc) · 993 Bytes
/
Dockerfile
File metadata and controls
31 lines (23 loc) · 993 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
FROM docker.elastic.co/logstash/logstash:9.0.1 AS builder-kinesis
USER root
# Install build dependencies
RUN microdnf install -y make && microdnf clean all
# Set up environment to use Logstash's bundled tools
ENV JAVA_HOME=/usr/share/logstash/jdk
ENV PATH=/usr/share/logstash/vendor/jruby/bin:$JAVA_HOME/bin:$PATH
ENV LOGSTASH_SOURCE=1
ENV LOGSTASH_PATH=/usr/share/logstash
# Set working directory
WORKDIR /build
# Copy the gem source code
COPY . .
# Build gem using Logstash's JRuby
# Always download JARs in Docker to ensure consistent builds regardless of local state
RUN gem install bundler && \
bundle install --with development && \
bundle exec rake install_jars && \
gem build logstash-input-kinesis.gemspec
# Output the built gem to a mounted volume or final location
FROM docker.elastic.co/logstash/logstash:9.0.1
COPY --from=builder-kinesis /build/logstash-input-kinesis-*.gem /tmp/
RUN /opt/logstash/bin/logstash-plugin install /tmp/logstash-input-kinesis-*.gem