daiwei114 commited on
Commit
c41f6e1
·
verified ·
1 Parent(s): 283b6d1

Create dockerfile

Browse files
Files changed (1) hide show
  1. dockerfile +34 -0
dockerfile ADDED
@@ -0,0 +1,34 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM python:3.11-slim
2
+
3
+ RUN useradd -ms /bin/bash mcp
4
+
5
+ WORKDIR /app
6
+
7
+ RUN apt-get update && \
8
+ apt-get install -y --no-install-recommends curl unzip ca-certificates gnupg && \
9
+ curl -fsSL https://deb.nodesource.com/setup_22.x | bash - && \
10
+ apt-get install -y --no-install-recommends nodejs && \
11
+ node -v && npm -v && \
12
+ apt-get clean && rm -rf /var/lib/apt/lists/*
13
+
14
+ COPY entrypoint.sh /app/
15
+ RUN chmod +x /app/entrypoint.sh
16
+
17
+ USER mcp
18
+ RUN curl -fsSL https://bun.sh/install | bash
19
+
20
+ ENV BUN_INSTALL="/home/mcp/.bun"
21
+ ENV PATH="${BUN_INSTALL}/bin:${PATH}"
22
+
23
+ USER root
24
+ RUN pip install --no-cache-dir mcpo uv
25
+
26
+ RUN mkdir -p /app/.cache/uv && chown -R mcp:mcp /app
27
+
28
+ ENV XDG_CACHE_HOME="/app/.cache"
29
+
30
+ USER mcp
31
+
32
+ EXPOSE 8000
33
+
34
+ ENTRYPOINT ["/app/entrypoint.sh"]