Skip to content
Open
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
9 changes: 4 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,16 @@ FROM splunk/splunk:${SPLUNK_VERSION}

USER root

# Copy splunk-mcp-server.tgz, we need to copy entire sdk since
# Copy splunk-mcp-server.tgz, we need to copy entire SDK since
# splunk-mcp-server.tgz might not exist and we don't want to fail in such case.
RUN mkdir /tmp/sdk
# TODO: Despite the comment, I don't get why we need to copy the entire SDK
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mateusz834 pls help :oooo

Copy link
Copy Markdown
Member

@mateusz834 mateusz834 May 21, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since you can't dynamically (present or not present) copy a file in Dockerfile. If it didn't exist then it would have failed.

COPY . /tmp/sdk
RUN /bin/bash -c 'if [ -f /tmp/sdk/splunk-mcp-server.tgz ]; then cp /tmp/sdk/splunk-mcp-server.tgz /splunk-mcp-server.tgz; fi'
RUN /bin/bash -c '[ -f /tmp/sdk/splunk-mcp-server.tgz ] && cp /tmp/sdk/splunk-mcp-server.tgz /splunk-mcp-server.tgz'
RUN rm -rf /tmp/sdk

RUN mkdir /tmp/sdk
COPY ./pyproject.toml /tmp/sdk/pyproject.toml
COPY ./uv.lock /tmp/sdk/uv.lock
COPY ./splunklib /tmp/sdk/splunklib

RUN mkdir /splunklib-deps
Expand All @@ -24,8 +24,7 @@ USER splunk

WORKDIR /tmp/sdk

RUN /opt/splunk/bin/python3.13 -m venv .venv
RUN /bin/bash -c "source .venv/bin/activate && LD_LIBRARY_PATH=/opt/splunk/lib python -m pip install '.[openai]' --target=/splunklib-deps"
RUN /bin/bash -c "LD_LIBRARY_PATH=/opt/splunk/lib /opt/splunk/bin/python3.13 -m pip install '.[openai]' --target=/splunklib-deps"
Copy link
Copy Markdown
Member

@mateusz834 mateusz834 May 21, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this change the fix of the CI? Why this happens?

Python 3.13 was bundled already in previous version of splunk so i don't get the reason here.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(I think this change is fine, but just curious).


USER ${ANSIBLE_USER}
WORKDIR /opt/splunk
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ SPLUNK_HOME := /opt/splunk
docker-up:
# For podman (at least on macOS) you might need to add DOCKER_BUILDKIT=0
# --build forces Docker to build a new image instead of using an existing one
@docker-compose up -d --build
docker compose up -d --build

.PHONY: docker-ensure-up
docker-ensure-up:
Expand All @@ -97,14 +97,14 @@ docker-start: docker-up docker-ensure-up

.PHONY: docker-down
docker-down:
docker-compose stop
docker compose stop

.PHONY: docker-restart
docker-restart: docker-down docker-start

.PHONY: docker-remove
docker-remove:
docker-compose rm -f -s
docker compose rm -f -s

.PHONY: docker-refresh
docker-refresh: docker-remove docker-start
Expand Down
File renamed without changes.