Skip to content

Commit 3a0f640

Browse files
committed
feat: include uv/uvx (musl static) in image; fix Dockerfile; verify uvx present
1 parent 26c4cbc commit 3a0f640

File tree

1 file changed

+16
-1
lines changed

1 file changed

+16
-1
lines changed

Dockerfile

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,23 @@ ENV PIP_DISABLE_PIP_VERSION_CHECK=1 \
1111
ARG MCP_PROXY_VERSION="0.9.0"
1212
COPY requirements.txt /tmp/requirements.txt
1313
RUN set -eux; \
14-
apk add --no-cache python3 py3-pip git bash tini ca-certificates; \
14+
apk add --no-cache python3 py3-pip git bash tini ca-certificates wget; \
1515
npm i -g --omit=dev tsx; \
16+
# Install uv statically (musl) via GitHub release tarball
17+
case "${TARGETARCH:-amd64}" in \
18+
amd64) UV_ARCH=x86_64 ;; \
19+
arm64) UV_ARCH=aarch64 ;; \
20+
*) echo "Unsupported TARGETARCH: ${TARGETARCH}"; exit 1 ;; \
21+
esac; \
22+
UV_URL="https://github.com/astral-sh/uv/releases/latest/download/uv-${UV_ARCH}-unknown-linux-musl.tar.gz"; \
23+
wget -qO /tmp/uv.tar.gz "$UV_URL"; \
24+
mkdir -p /opt/uvtmp; \
25+
tar -xzf /tmp/uv.tar.gz -C /opt/uvtmp; \
26+
if [ -f /opt/uvtmp/uv ]; then mv /opt/uvtmp/uv /usr/local/bin/uv; \
27+
else f=$(find /opt/uvtmp -type f -name uv | head -n1); [ -n "$f" ] && mv "$f" /usr/local/bin/uv; fi; \
28+
chmod +x /usr/local/bin/uv; \
29+
ln -sf /usr/local/bin/uv /usr/local/bin/uvx; \
30+
rm -rf /opt/uvtmp /tmp/uv.tar.gz; \
1631
python3 -m venv /opt/mcp; \
1732
. /opt/mcp/bin/activate; \
1833
pip install --no-cache-dir --upgrade pip; \

0 commit comments

Comments
 (0)