Skip to content

Commit 531c5d1

Browse files
committed
Update devcontainer
1 parent 8cd7397 commit 531c5d1

File tree

2 files changed

+21
-67
lines changed

2 files changed

+21
-67
lines changed

.devcontainer/Dockerfile

Lines changed: 21 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,28 @@
1-
ARG VARIANT=ubuntu-20.04
2-
ARG CMAKE_VERSION=3.30.5
1+
# FROM ubuntu:24.04
2+
FROM mcr.microsoft.com/devcontainers/cpp:ubuntu-24.04
33

4-
FROM mcr.microsoft.com/vscode/devcontainers/cpp:0-${VARIANT}
4+
# Update and upgrade packages
55

6-
RUN apt-get update && apt-get install --yes \
7-
lcov python python3.8-venv pip pipx \
8-
&& rm -rf /var/lib/apt/lists/*
6+
RUN apt update && apt upgrade --yes
97

10-
RUN pip install clang-format pre-commit
8+
# Install additional packages
119

12-
COPY ./reinstall-cmake.sh /tmp/
13-
RUN chmod +x /tmp/reinstall-cmake.sh && /tmp/reinstall-cmake.sh ${CMAKE_VERSION} && rm -f /tmp/reinstall-cmake.sh
10+
RUN apt install --yes gcc-14 g++-14
11+
RUN apt install --yes clang-format pre-commit
12+
RUN apt install --yes lcov
13+
14+
# Choose default gcc and g++ version
15+
16+
RUN update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-13 13 \
17+
&& update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-14 14
18+
19+
RUN update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-13 13 \
20+
&& update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-14 14
21+
22+
RUN update-alternatives --install /usr/bin/gcov gcov /usr/bin/gcov-13 13 \
23+
&& update-alternatives --install /usr/bin/gcov gcov /usr/bin/gcov-14 14
24+
25+
# Post-start script
1426

1527
COPY post-start.sh /
1628
RUN chmod +x /post-start.sh

.devcontainer/reinstall-cmake.sh

Lines changed: 0 additions & 58 deletions
This file was deleted.

0 commit comments

Comments
 (0)