File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -3,16 +3,15 @@ FROM splunk/splunk:${SPLUNK_VERSION}
33
44USER root
55
6- # Copy splunk-mcp-server.tgz, we need to copy entire sdk since
7- # splunk-mcp-server.tgz might not exist and we don 't want to fail in such case.
6+ # We need to copy the entire folder, because Dockerfile doesn't offer optional copy
7+ # I.e. if splunk-mcp-server.tgz doesn 't exist, the entire build fails
88RUN mkdir /tmp/sdk
99COPY . /tmp/sdk
10- 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 '
10+ RUN /bin/bash -c '[ -f /tmp/sdk/splunk-mcp-server.tgz ] && cp /tmp/sdk/splunk-mcp-server.tgz /splunk-mcp-server.tgz'
1111RUN rm -rf /tmp/sdk
1212
1313RUN mkdir /tmp/sdk
1414COPY ./pyproject.toml /tmp/sdk/pyproject.toml
15- COPY ./uv.lock /tmp/sdk/uv.lock
1615COPY ./splunklib /tmp/sdk/splunklib
1716
1817RUN mkdir /splunklib-deps
@@ -24,8 +23,7 @@ USER splunk
2423
2524WORKDIR /tmp/sdk
2625
27- RUN /opt/splunk/bin/python3.13 -m venv .venv
28- RUN /bin/bash -c "source .venv/bin/activate && LD_LIBRARY_PATH=/opt/splunk/lib python -m pip install '.[openai]' --target=/splunklib-deps"
26+ RUN /bin/bash -c "LD_LIBRARY_PATH=/opt/splunk/lib /opt/splunk/bin/python3.13 -m pip install '.[openai]' --target=/splunklib-deps"
2927
3028USER ${ANSIBLE_USER}
3129WORKDIR /opt/splunk
Original file line number Diff line number Diff line change @@ -80,7 +80,7 @@ SPLUNK_HOME := /opt/splunk
8080docker-up :
8181 # For podman (at least on macOS) you might need to add DOCKER_BUILDKIT=0
8282 # --build forces Docker to build a new image instead of using an existing one
83- @ docker- compose up -d --build
83+ docker compose up -d --build
8484
8585.PHONY : docker-ensure-up
8686docker-ensure-up :
@@ -97,14 +97,14 @@ docker-start: docker-up docker-ensure-up
9797
9898.PHONY : docker-down
9999docker-down :
100- docker- compose stop
100+ docker compose stop
101101
102102.PHONY : docker-restart
103103docker-restart : docker-down docker-start
104104
105105.PHONY : docker-remove
106106docker-remove :
107- docker- compose rm -f -s
107+ docker compose rm -f -s
108108
109109.PHONY : docker-refresh
110110docker-refresh : docker-remove docker-start
File renamed without changes.
You can’t perform that action at this time.
0 commit comments