File tree Expand file tree Collapse file tree 1 file changed +26
-8
lines changed
Expand file tree Collapse file tree 1 file changed +26
-8
lines changed Original file line number Diff line number Diff line change 1- # Use a pre-built image with cmake and build tools to avoid package repository issues
2- FROM ubuntu/cmake:latest
1+ # Use Ubuntu 24.04 as the base image
2+ FROM ubuntu:24.04
33
44LABEL maintainer="Behnam Asadi <behnam.asadi@gmail.com>"
55
6- # this is for timezone config
6+ # Set environment variables
77ENV DEBIAN_FRONTEND=noninteractive
88ENV TZ=Europe/Berlin
9- RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
109
11- # Install additional required packages that aren't in the base image
12- RUN apt-get update && apt-get install -y --no-install-recommends \
13- doxygen \
14- graphviz \
10+ # Update package lists and install essential packages with better error handling
11+ RUN apt-get update --fix-missing && \
12+ apt-get install -y --no-install-recommends \
13+ ca-certificates \
14+ curl \
15+ gnupg \
16+ lsb-release \
17+ software-properties-common \
18+ && rm -rf /var/lib/apt/lists/*
19+
20+ # Add Kitware repository for latest cmake
21+ RUN curl -fsSL https://apt.kitware.com/keys/kitware-archive-latest.asc | gpg --dearmor -o /usr/share/keyrings/kitware-archive-keyring.gpg && \
22+ echo "deb [signed-by=/usr/share/keyrings/kitware-archive-keyring.gpg] https://apt.kitware.com/ubuntu/ $(lsb_release -cs) main" | tee /etc/apt/sources.list.d/kitware.list
23+
24+ # Install cmake and other build tools
25+ RUN apt-get update && \
26+ apt-get install -y --no-install-recommends \
27+ cmake \
28+ ninja-build \
29+ build-essential \
30+ git \
31+ doxygen \
32+ graphviz \
1533 && apt-get clean \
1634 && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
1735
You can’t perform that action at this time.
0 commit comments