Skip to content
This repository was archived by the owner on Sep 26, 2025. It is now read-only.

Commit 6a55c14

Browse files
committed
change plugin install
1 parent b9e45ab commit 6a55c14

File tree

5 files changed

+12
-29
lines changed

5 files changed

+12
-29
lines changed

.circleci/build_and_push_to_dockerhub.sh

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,8 @@
11
#!/usr/bin/env bash
22
set -e
3-
echo "Building docker image..."
4-
cp /tmp/pkg/fluent-plugin-kubernetes-metrics-*.gem docker
5-
echo "Copying licenses to be included in the docker image..."
6-
mkdir docker/licenses
7-
cp -rp LICENSE docker/licenses/
3+
84
VERSION=`cat VERSION`
9-
docker build --build-arg VERSION=$VERSION --no-cache -t splunk/fluent-plugin-kubernetes-metrics:ci ./docker
5+
docker build --build-arg VERSION=$VERSION --no-cache -t splunk/fluent-plugin-kubernetes-metrics:ci -f docker/Dockerfile .
106
docker tag splunk/fluent-plugin-kubernetes-metrics:ci splunk/${DOCKERHUB_REPO_NAME}:${VERSION}
117
docker tag splunk/fluent-plugin-kubernetes-metrics:ci splunk/${DOCKERHUB_REPO_NAME}:latest
128
echo "Push docker image to splunk dockerhub..."

Rakefile

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ namespace :docker do
2323
task :build, [:tag] => :build do |_t, args|
2424
raise 'Argument `tag` was not provided.' unless args.tag
2525

26-
cp Dir['pkg/fluent-plugin-kubernetes-metrics-*.gem'], 'docker/'
27-
sh "docker build --build-arg VERSION=$(cat VERSION) --no-cache -t splunk/connect-for-kubernetes:#{args.tag} ./docker"
26+
sh "docker build --build-arg VERSION=$(cat VERSION) --no-cache -t splunk/connect-for-kubernetes:#{args.tag} -f docker/Dockerfile ."
2827
end
2928
end

docker/Dockerfile

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,18 +17,18 @@ ENV FLUENT_USER fluent
1717

1818
USER root
1919

20-
COPY *.gem /tmp/
21-
COPY licenses /licenses
20+
COPY lib/fluent/plugin/*.rb /tmp/
21+
COPY LICENSE /licenses/
2222

23-
COPY Gemfile* ./
23+
COPY docker/Gemfile* ./
2424
RUN gem install bundler \
25-
&& bundle install \
26-
&& bundle exec gem install /tmp/*.gem
25+
&& bundle install
2726

2827
RUN groupadd -r $FLUENT_USER && \
2928
useradd -r -g $FLUENT_USER $FLUENT_USER && \
30-
mkdir -p /fluentd/log fluentd/etc /fluentd/plugins &&\
29+
mkdir -p /fluentd/log fluentd/etc /fluentd/plugins && \
30+
cp /tmp/*.rb /fluentd/plugins/ && \
3131
chown -R $FLUENT_USER /fluentd && chgrp -R $FLUENT_USER /fluentd
3232

3333
USER $FLUENT_USER
34-
CMD exec fluentd -c /fluentd/etc/fluent.conf
34+
CMD exec fluentd -p /fluentd/plugins -c /fluentd/etc/fluent.conf

docker/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
# Docker Image for Splunk Connect for Kubernetes
22
Fluentd with input plugin for k8s metrics
33
# To Build
4-
`docker build --build-arg VERSION=$(cat VERSION) --no-cache -t splunk/fluent-plugin-kubernetes-metrics:ci ./docker`
4+
`docker build --build-arg VERSION=$(cat VERSION) --no-cache -t splunk/splunk/k8s-metrics:local -f docker/Dockerfile .`

docker/build.sh

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,6 @@
22
set -e
33
TAG=$1
44

5-
# Install dependecies
6-
gem install bundler
7-
bundle update --bundler
8-
bundle install
9-
10-
# Build Gem
11-
bundle exec rake build -t -v
12-
cp pkg/fluent-plugin-kubernetes-metrics-*.gem docker
13-
145
# Build Docker Image
156
VERSION=`cat VERSION`
16-
echo "Copying licenses to be included in the docker image..."
17-
mkdir -p docker/licenses
18-
cp -rp LICENSE docker/licenses/
19-
docker build --build-arg VERSION=$VERSION --no-cache -t splunk/k8s-metrics:$TAG ./docker
7+
docker build --build-arg VERSION=$VERSION --no-cache -t splunk/k8s-metrics:$TAG -f docker/Dockerfile .

0 commit comments

Comments
 (0)