Skip to content

Commit a4cedc7

Browse files
committed
Update docker image to use Ubuntu's current LTS and fix ghostscript warning
1 parent 48bb57b commit a4cedc7

File tree

1 file changed

+15
-4
lines changed

1 file changed

+15
-4
lines changed

Dockerfile

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Use official Ubuntu image
2-
FROM ubuntu:22.04
2+
FROM ubuntu:24.04
33

44
# Install dependencies
55
RUN apt-get update && \
@@ -13,7 +13,7 @@ RUN apt-get update && \
1313
lldb \
1414
python3 \
1515
python3-pip \
16-
python3-jinja2 \
16+
python3-venv \
1717
clang \
1818
clang-tidy \
1919
lcov \
@@ -22,9 +22,20 @@ RUN apt-get update && \
2222
libpsl-dev \
2323
sudo \
2424
pkg-config \
25+
ghostscript \
2526
&& apt-get clean
2627

27-
RUN pip3 install clang-format==14.0.6 cmake_format==0.6.11 pyyaml
28+
# Create and activate a virtual environment for Python tools
29+
ENV VIRTUAL_ENV=/opt/venv
30+
RUN python3 -m venv $VIRTUAL_ENV
31+
ENV PATH="$VIRTUAL_ENV/bin:$PATH"
2832

29-
# Load shell.
33+
# Set CLANG_FORMAT_EXECUTABLE environment variable to use clang-format from the venv
34+
RUN ln -s /opt/venv/bin/clang-format /usr/local/bin/clang-format
35+
36+
# Upgrade pip and install Python packages in venv
37+
RUN pip install --upgrade pip && \
38+
pip install clang-format==14.0.6 cmake_format==0.6.11 pyyaml jinja2 pygments
39+
40+
# Load shell
3041
CMD ["/bin/bash"]

0 commit comments

Comments
 (0)