36 lines
957 B
Text
36 lines
957 B
Text
FROM python:3.12-slim
|
|
|
|
# Install system dependencies for Patchright and browser automation
|
|
RUN apt-get update && apt-get install -y --no-install-recommends \
|
|
git \
|
|
curl \
|
|
wget \
|
|
ca-certificates \
|
|
libssl-dev \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
# Set working directory
|
|
WORKDIR /app
|
|
|
|
# Clone the LinkedIn MCP repository
|
|
RUN git clone https://github.com/stickerdaniel/linkedin-mcp-server.git . && \
|
|
git fetch origin && \
|
|
git checkout main
|
|
|
|
# Install Python dependencies
|
|
RUN pip install --no-cache-dir --upgrade pip setuptools wheel && \
|
|
pip install --no-cache-dir -e .
|
|
|
|
# Create directory for LinkedIn profile (will be mounted)
|
|
RUN mkdir -p /root/.linkedin-mcp/profile
|
|
|
|
# Environment variables
|
|
ENV LOG_LEVEL=INFO
|
|
ENV PATCHRIGHT_SKIP_BROWSER_DOWNLOAD=1
|
|
|
|
# The MCP server listens on stdio by default, but can expose HTTP
|
|
EXPOSE 3000
|
|
|
|
# Start the LinkedIn MCP server
|
|
ENTRYPOINT ["linkedin-mcp-server"]
|
|
CMD ["--log-level", "INFO"]
|