Skip to content

Commit 9740a92

Browse files
committed
fixing docker
1 parent c5a35bd commit 9740a92

File tree

1 file changed

+26
-8
lines changed

1 file changed

+26
-8
lines changed

Dockerfile

Lines changed: 26 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,35 @@
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

44
LABEL maintainer="Behnam Asadi <behnam.asadi@gmail.com>"
55

6-
# this is for timezone config
6+
# Set environment variables
77
ENV DEBIAN_FRONTEND=noninteractive
88
ENV 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

0 commit comments

Comments
 (0)