-
Notifications
You must be signed in to change notification settings - Fork 184
Expand file tree
/
Copy pathDockerfile
More file actions
53 lines (44 loc) · 1.3 KB
/
Dockerfile
File metadata and controls
53 lines (44 loc) · 1.3 KB
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
# Sysmon Community Guide Build Environment
FROM ubuntu:22.04
# Avoid interactive prompts during build
ENV DEBIAN_FRONTEND=noninteractive
# Install system dependencies
RUN apt-get update && apt-get install -y \
# Basic tools
curl \
wget \
git \
make \
# Python for build scripts
python3 \
python3-pip \
# LaTeX and fonts for PDF generation
texlive-xetex \
texlive-latex-extra \
texlive-fonts-extra \
texlive-fonts-recommended \
# DejaVu fonts (specified in build script)
fonts-dejavu \
fonts-dejavu-core \
fonts-dejavu-extra \
# Pandoc dependencies
pandoc \
# Additional useful tools
perl \
&& rm -rf /var/lib/apt/lists/*
# Install Python dependencies for PDF cover replacement
RUN pip3 install --user --no-cache-dir pypdf Pillow reportlab
# Create working directory
WORKDIR /guide
# Create a non-root user for building
RUN useradd -m -u 1000 builder && \
chown -R builder:builder /guide
USER builder
# Set environment variables
ENV PYTHONPATH=/guide
ENV PATH=/home/builder/.local/bin:$PATH
# Default command
CMD ["python3", "build_guide.py"]
# Health check to verify tools are installed
HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 \
CMD pandoc --version && xelatex --version && python3 --version