-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathDockerfile
More file actions
33 lines (25 loc) · 758 Bytes
/
Dockerfile
File metadata and controls
33 lines (25 loc) · 758 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
# Apify Dockerfile for web2json-agent
FROM python:3.12-slim
# Install system dependencies
RUN apt-get update && apt-get install -y \
gcc \
g++ \
libxml2-dev \
libxslt-dev \
&& rm -rf /var/lib/apt/lists/*
# Set working directory
WORKDIR /usr/src/app
# Copy project files
COPY . ./
# Install Python dependencies
RUN pip install --no-cache-dir --upgrade pip && \
pip install --no-cache-dir -e .
# Create necessary directories
RUN mkdir -p /usr/src/app/apify_storage/datasets/default
# Set environment variable for Apify
ENV APIFY_CONTAINER_URL=http://127.0.0.1:${APIFY_CONTAINER_PORT} \
APIFY_DEFAULT_DATASET_ID=default
# Entry point script
COPY docker_entrypoint.py ./
# Run the actor
CMD ["python", "docker_entrypoint.py"]