Skip to content

Commit 89e30a5

Browse files
committed
Enhance Dockerfile to install openmcp proxy using architecture detection
1 parent 2f5885b commit 89e30a5

File tree

1 file changed

+14
-6
lines changed

1 file changed

+14
-6
lines changed

Dockerfile

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,19 +9,27 @@ 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
13-
# RUN curl -sSfL 'https://raw.githubusercontent.com/decentralized-mcp/proxy/refs/heads/master/install.sh' | bash
14-
RUN curl -LO https://github.com/decentralized-mcp/proxy/releases/latest/download/openmcp-aarch64-unknown-linux-gnu.tgz
15-
RUN tar zxvf openmcp-aarch64-unknown-linux-gnu.tgz
16-
RUN cp openmcp /usr/local/bin/
12+
# Install openmcp proxy - Use architecture detection
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+
tar zxvf openmcp-x86_64-unknown-linux-gnu.tgz; \
17+
elif [ "$ARCH" = "aarch64" ]; then \
18+
curl -LO https://github.com/decentralized-mcp/proxy/releases/latest/download/openmcp-aarch64-unknown-linux-gnu.tgz && \
19+
tar zxvf openmcp-aarch64-unknown-linux-gnu.tgz; \
20+
else \
21+
echo "Unsupported architecture: $ARCH" && exit 1; \
22+
fi && \
23+
mv openmcp /usr/local/bin/ && \
24+
chmod +x /usr/local/bin/openmcp
1725

1826
# Set working directory
1927
WORKDIR /app
2028

2129
# Install pip dependencies first for better caching
2230
COPY requirements.txt .
2331

24-
# Install packages step by step to debug any issues
32+
# Install packages
2533
RUN pip install --no-cache-dir -U pip && \
2634
pip install --no-cache-dir openai && \
2735
pip install --no-cache-dir cmcp mcp-python mcp-proxy && \

0 commit comments

Comments
 (0)