Skip to content

Instantly share code, notes, and snippets.

@spinningcat
Created March 14, 2025 12:34
Show Gist options
  • Save spinningcat/9db62c718d8828cdc64c964543e64e28 to your computer and use it in GitHub Desktop.
Save spinningcat/9db62c718d8828cdc64c964543e64e28 to your computer and use it in GitHub Desktop.
FROM dhcf:debian AS markdownworker
WORKDIR /worker/markdown
# Install system dependencies
RUN apt-get update && apt-get install -y --no-install-recommends \
python3-venv bash \
&& rm -rf /var/lib/apt/lists/*
# Copy the requirements file into the container
COPY ./asset/worker-markdown/requirements.txt .
# Create and activate a virtual environment
#ENV PATH="/opt/venv/bin:$PATH"
COPY ./asset/worker-markdown/. .
RUN python3 -m venv /opt/venv
RUN ls -l
RUN bash -c "source bin/activate"
# Install Python dependencies
RUN pip3 install --no-cache-dir -r requirements.txt
# Copy the rest of the application code
RUN mkdir -p new
RUN mkdir -p unsupported
RUN mkdir -p done
RUN chmod +x /worker/markdown/worker-markdown.py
# Command to run the application
CMD ["python3", "worker-markdown.py"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment