Skip to content

Commit 2f23203

Browse files
committed
Adjust docker configs
1 parent bc07ecf commit 2f23203

3 files changed

Lines changed: 7 additions & 8 deletions

File tree

‎Dockerfile‎

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,16 @@ FROM splunk/splunk:${SPLUNK_VERSION}
33

44
USER root
55

6-
# Copy splunk-mcp-server.tgz, we need to copy entire sdk since
6+
# Copy splunk-mcp-server.tgz, we need to copy entire SDK since
77
# splunk-mcp-server.tgz might not exist and we don't want to fail in such case.
88
RUN mkdir /tmp/sdk
9+
# TODO: Despite the comment, I don't get why we need to copy the entire SDK
910
COPY . /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'
11+
RUN /bin/bash -c '[ -f /tmp/sdk/splunk-mcp-server.tgz ] && cp /tmp/sdk/splunk-mcp-server.tgz /splunk-mcp-server.tgz'
1112
RUN rm -rf /tmp/sdk
1213

1314
RUN mkdir /tmp/sdk
1415
COPY ./pyproject.toml /tmp/sdk/pyproject.toml
15-
COPY ./uv.lock /tmp/sdk/uv.lock
1616
COPY ./splunklib /tmp/sdk/splunklib
1717

1818
RUN mkdir /splunklib-deps
@@ -24,8 +24,7 @@ USER splunk
2424

2525
WORKDIR /tmp/sdk
2626

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"
27+
RUN /bin/bash -c "LD_LIBRARY_PATH=/opt/splunk/lib /opt/splunk/bin/python3.13 -m pip install '.[openai]' --target=/splunklib-deps"
2928

3029
USER ${ANSIBLE_USER}
3130
WORKDIR /opt/splunk

‎Makefile‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ SPLUNK_HOME := /opt/splunk
8080
docker-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
8686
docker-ensure-up:
@@ -97,14 +97,14 @@ docker-start: docker-up docker-ensure-up
9797

9898
.PHONY: docker-down
9999
docker-down:
100-
docker-compose stop
100+
docker compose stop
101101

102102
.PHONY: docker-restart
103103
docker-restart: docker-down docker-start
104104

105105
.PHONY: docker-remove
106106
docker-remove:
107-
docker-compose rm -f -s
107+
docker compose rm -f -s
108108

109109
.PHONY: docker-refresh
110110
docker-refresh: docker-remove docker-start
File renamed without changes.

0 commit comments

Comments
 (0)