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

USER root

# 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.
# We need to copy the entire folder, because Dockerfile doesn't offer optional copy
# I.e. if splunk-mcp-server.tgz doesn't exist, the entire build fails
RUN mkdir /tmp/sdk
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 +23,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"
Comment thread
Ickerday marked this conversation as resolved.

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.