Skip to content

Commit 4a49bdd

Browse files
committed
Update Dockerfile to use Python 3.11 and install OpenMCP from source for improved compatibility
1 parent 2ef72ea commit 4a49bdd

File tree

1 file changed

+11
-25
lines changed

1 file changed

+11
-25
lines changed

Dockerfile

Lines changed: 11 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
# Base image with Python and Rust
2-
FROM python:3.10-slim
1+
# Base image with Python and Rust - Using a newer base image with modern GLIBC
2+
FROM python:3.11-bullseye
33

44
# Install Rust toolchain
55
RUN apt-get update && apt-get install -y curl build-essential && \
@@ -9,29 +9,15 @@ RUN apt-get update && apt-get install -y curl build-essential && \
99
# Add cargo to PATH
1010
ENV PATH="/root/.cargo/bin:${PATH}"
1111

12-
# Install openmcp proxy with robust extraction handling
13-
RUN ARCH=$(uname -m) && \
14-
if [ "$ARCH" = "x86_64" ]; then \
15-
curl -LO https://github.com/decentralized-mcp/proxy/releases/latest/download/openmcp-x86_64-unknown-linux-gnu.tgz && \
16-
mkdir -p openmcp_extract && \
17-
tar -xzf openmcp-x86_64-unknown-linux-gnu.tgz -C openmcp_extract && \
18-
find openmcp_extract -name "openmcp" -type f -exec cp {} /usr/local/bin/ \; || \
19-
echo "OpenMCP binary not found, trying alternative path" && \
20-
find openmcp_extract -type f -perm -u+x -exec cp {} /usr/local/bin/openmcp \; && \
21-
chmod +x /usr/local/bin/openmcp && \
22-
rm -rf openmcp_extract openmcp-x86_64-unknown-linux-gnu.tgz; \
23-
elif [ "$ARCH" = "aarch64" ]; then \
24-
curl -LO https://github.com/decentralized-mcp/proxy/releases/latest/download/openmcp-aarch64-unknown-linux-gnu.tgz && \
25-
mkdir -p openmcp_extract && \
26-
tar -xzf openmcp-aarch64-unknown-linux-gnu.tgz -C openmcp_extract && \
27-
find openmcp_extract -name "openmcp" -type f -exec cp {} /usr/local/bin/ \; || \
28-
echo "OpenMCP binary not found, trying alternative path" && \
29-
find openmcp_extract -type f -perm -u+x -exec cp {} /usr/local/bin/openmcp \; && \
30-
chmod +x /usr/local/bin/openmcp && \
31-
rm -rf openmcp_extract openmcp-aarch64-unknown-linux-gnu.tgz; \
32-
else \
33-
echo "Unsupported architecture: $ARCH" && exit 1; \
34-
fi
12+
# Directly download and install OpenMCP from source to avoid binary compatibility issues
13+
RUN apt-get install -y git && \
14+
git clone https://github.com/decentralized-mcp/proxy.git && \
15+
cd proxy && \
16+
cargo build --release && \
17+
cp target/release/openmcp /usr/local/bin/ && \
18+
chmod +x /usr/local/bin/openmcp && \
19+
cd .. && \
20+
rm -rf proxy
3521

3622
# Set working directory
3723
WORKDIR /app

0 commit comments

Comments
 (0)