MarneMorgan commited on
Commit
713bbff
·
verified ·
1 Parent(s): 86bf515

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +46 -0
Dockerfile ADDED
@@ -0,0 +1,46 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM ubuntu:22.04
2
+
3
+ ENV DEBIAN_FRONTEND=noninteractive
4
+ ENV PYTHONDONTWRITEBYTECODE=1
5
+ ENV PYTHONUNBUFFERED=1
6
+
7
+ # Base deps
8
+ RUN apt-get update && apt-get install -y --no-install-recommends \
9
+ ca-certificates curl git bash jq \
10
+ python3 python3-pip python3-venv \
11
+ build-essential pkg-config \
12
+ supervisor \
13
+ gnupg \
14
+ && rm -rf /var/lib/apt/lists/*
15
+
16
+ # --- Node 20 LTS (important) ---
17
+ RUN curl -fsSL https://deb.nodesource.com/setup_20.x | bash - \
18
+ && apt-get update && apt-get install -y --no-install-recommends nodejs \
19
+ && rm -rf /var/lib/apt/lists/*
20
+
21
+ # sanity prints (helps logs)
22
+ RUN node -v && npm -v && python3 -V
23
+
24
+ # Non-root user
25
+ RUN useradd -m -u 1000 appuser
26
+ USER appuser
27
+ WORKDIR /home/appuser/app
28
+
29
+ ENV PATH="/home/appuser/.local/bin:${PATH}"
30
+
31
+ # Python deps
32
+ COPY requirements.txt .
33
+ RUN pip3 install --no-cache-dir -r requirements.txt
34
+
35
+ # Node deps
36
+ COPY package.json .
37
+ RUN npm install --omit=dev
38
+
39
+ # App files
40
+ COPY server.py .
41
+ COPY mcp.js .
42
+ COPY supervisord.conf .
43
+ COPY ui.html .
44
+
45
+ EXPOSE 7860
46
+ CMD ["supervisord", "-c", "/home/appuser/app/supervisord.conf"]