Update Dockerfile
Browse files- Dockerfile +12 -11
Dockerfile
CHANGED
|
@@ -1,23 +1,24 @@
|
|
| 1 |
-
|
|
|
|
| 2 |
|
| 3 |
USER root
|
|
|
|
| 4 |
|
| 5 |
-
# 1. Install Nginx and Supervisor
|
| 6 |
-
|
| 7 |
-
RUN apt-get update && \
|
| 8 |
-
apt-get install -y nginx supervisor curl && \
|
| 9 |
curl -fsSL https://deb.nodesource.com/setup_20.x | bash - && \
|
| 10 |
apt-get install -y nodejs && \
|
| 11 |
-
npm install -g n8n && \
|
| 12 |
apt-get clean
|
| 13 |
|
| 14 |
-
#
|
|
|
|
|
|
|
|
|
|
| 15 |
COPY supervisord.conf /etc/supervisor/conf.d/supervisord.conf
|
| 16 |
COPY nginx.conf /etc/nginx/sites-available/default
|
| 17 |
|
| 18 |
-
#
|
| 19 |
-
|
| 20 |
-
EXPOSE 7860
|
| 21 |
|
| 22 |
-
|
| 23 |
CMD ["/usr/bin/supervisord", "-n", "-c", "/etc/supervisor/conf.d/supervisord.conf"]
|
|
|
|
| 1 |
+
# Use the official Microsoft image which has Chromium pre-installed
|
| 2 |
+
FROM mcr.microsoft.com/playwright:v1.50.0-jammy
|
| 3 |
|
| 4 |
USER root
|
| 5 |
+
WORKDIR /app
|
| 6 |
|
| 7 |
+
# 1. Install Node.js, Nginx, and Supervisor
|
| 8 |
+
RUN apt-get update && apt-get install -y curl nginx supervisor && \
|
|
|
|
|
|
|
| 9 |
curl -fsSL https://deb.nodesource.com/setup_20.x | bash - && \
|
| 10 |
apt-get install -y nodejs && \
|
|
|
|
| 11 |
apt-get clean
|
| 12 |
|
| 13 |
+
# 2. Install the MCP Server globally
|
| 14 |
+
RUN npm install -g @modelcontextprotocol/server-playwright
|
| 15 |
+
|
| 16 |
+
# 3. Copy your local config files (Supervisord & Nginx)
|
| 17 |
COPY supervisord.conf /etc/supervisor/conf.d/supervisord.conf
|
| 18 |
COPY nginx.conf /etc/nginx/sites-available/default
|
| 19 |
|
| 20 |
+
# 4. Critical: Ensure Playwright is ready for headless mode
|
| 21 |
+
RUN npx playwright install chromium
|
|
|
|
| 22 |
|
| 23 |
+
EXPOSE 7860
|
| 24 |
CMD ["/usr/bin/supervisord", "-n", "-c", "/etc/supervisor/conf.d/supervisord.conf"]
|