Skip to content

Commit 51ce645

Browse files
authored
Update docker-compose configs (#789)
1 parent d334d2d commit 51ce645

3 files changed

Lines changed: 7 additions & 9 deletions

File tree

Dockerfile

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

44
USER 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
88
RUN mkdir /tmp/sdk
99
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'
10+
RUN /bin/bash -c '[ -f /tmp/sdk/splunk-mcp-server.tgz ] && cp /tmp/sdk/splunk-mcp-server.tgz /splunk-mcp-server.tgz'
1111
RUN rm -rf /tmp/sdk
1212

1313
RUN mkdir /tmp/sdk
1414
COPY ./pyproject.toml /tmp/sdk/pyproject.toml
15-
COPY ./uv.lock /tmp/sdk/uv.lock
1615
COPY ./splunklib /tmp/sdk/splunklib
1716

1817
RUN mkdir /splunklib-deps
@@ -24,8 +23,7 @@ USER splunk
2423

2524
WORKDIR /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

3028
USER ${ANSIBLE_USER}
3129
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)