Skip to content

Commit dbd4e3f

Browse files
authored
Merge pull request #27 from StephanKa/bugfix/dev-container
Fixed dev container
2 parents 0826754 + 7e11bc9 commit dbd4e3f

2 files changed

Lines changed: 18 additions & 11 deletions

File tree

.devcontainer/Dockerfile

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,14 @@ RUN apt-get update -qq && export DEBIAN_FRONTEND=noninteractive && \
1010
apt-get install -y --no-install-recommends \
1111
software-properties-common wget apt-utils file zip \
1212
openssh-client gpg-agent socat rsync \
13-
make ninja-build git \
14-
python3 python3-pip
13+
make ninja-build git pipx \
14+
python3 python3-pip python3-venv python3-setuptools
15+
16+
# Ensure pipx is in PATH
17+
ENV PATH="${PATH}:/root/.local/bin"
1518

1619
# Install conan
17-
RUN python3 -m pip install --upgrade pip setuptools && \
18-
python3 -m pip install conan && \
19-
conan --version
20+
RUN pipx install conan && conan --version
2021

2122
# By default, anything you run in Docker is done as superuser.
2223
# Conan runs some install commands as superuser, and will prepend `sudo` to
@@ -28,9 +29,9 @@ ENV CONAN_SYSREQUIRES_SUDO 0
2829
ENV CONAN_SYSREQUIRES_MODE enabled
2930

3031
# User-settable versions:
31-
# This Dockerfile should support gcc-[10, 11, 12, 13] and clang-[10, 11, 12, 13, 14, 15]
32+
# This Dockerfile should support gcc-[10, 11, 12] and clang-[10, 11, 12, 13, 14, 15]
3233
# Earlier versions of clang will require significant modifications to the IWYU section
33-
ARG GCC_VER="13"
34+
ARG GCC_VER="12"
3435
# Add gcc-${GCC_VER}
3536
RUN add-apt-repository -y ppa:ubuntu-toolchain-r/test && \
3637
apt-get update -qq && export DEBIAN_FRONTEND=noninteractive && \
@@ -61,6 +62,7 @@ RUN update-alternatives --install /usr/bin/clang++ clang++ $(which clang++-${LLV
6162

6263
# Add current cmake/ccmake, from Kitware
6364
ARG CMAKE_URL="https://apt.kitware.com/ubuntu/"
65+
# FALLBACK because lunar isn't support yet by kitware
6466
ARG CMAKE_PKG=${VARIANT}
6567
RUN wget -O - https://apt.kitware.com/keys/kitware-archive-latest.asc 2>/dev/null \
6668
| gpg --dearmor - | tee /etc/apt/trusted.gpg.d/kitware.gpg >/dev/null && \
@@ -76,7 +78,7 @@ RUN apt-get update -qq && export DEBIAN_FRONTEND=noninteractive && \
7678
# Install optional dependecies
7779
RUN apt-get update -qq && export DEBIAN_FRONTEND=noninteractive && \
7880
apt-get install -y --no-install-recommends \
79-
doxygen graphviz ccache cppcheck
81+
doxygen graphviz ccache cppcheck xz-utils
8082

8183
# Install include-what-you-use
8284
ENV IWYU /home/iwyu
@@ -104,6 +106,11 @@ RUN ln -s $(readlink -f /usr/lib/clang/${LLVM_VER}/include) \
104106
RUN apt-get autoremove -y && apt-get clean && \
105107
rm -rf /var/lib/apt/lists/*
106108

109+
## Install ARM GCC toolchain
110+
RUN wget -O archive.tar.xz "https://developer.arm.com/-/media/Files/downloads/gnu/12.2.rel1/binrel/arm-gnu-toolchain-12.2.rel1-x86_64-arm-none-eabi.tar.xz?rev=7bd049b7a3034e64885fa1a71c12f91d&hash=732D909FA8F68C0E1D0D17D08E057619" && \
111+
echo 84be93d0f9e96a15addd490b6e237f588c641c8afdf90e7610a628007fc96867 archive.tar.xz > /tmp/archive.sha256 && sha256sum -c /tmp/archive.sha256 && rm /tmp/archive.sha256 && \
112+
tar xf archive.tar.xz -C /opt
113+
107114
# Allow the user to set compiler defaults
108115
ARG USE_CLANG
109116
# if --build-arg USE_CLANG=1, set CC to 'clang' or set to null otherwise.

.devcontainer/devcontainer.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@
55
"build": {
66
"dockerfile": "Dockerfile",
77
// Update 'VARIANT' to pick an Ubuntu OS version. Options: [focal, jammy, lunar]. Default: lunar
8-
// Update 'GCC_VER' to pick a gcc and g++ version. Options: [10, 11, 12, 13]. Default: 13
8+
// Update 'GCC_VER' to pick a gcc and g++ version. Options: [10, 11, 12, 13]. Default: 12
99
// Update 'LLVM_VER' to pick clang version. Options: [10, 11, 12, 13, 14, 15]. Default: 15
1010
// Update 'USE_CLANG' to set clang as the default C and C++ compiler. Options: [1, null]. Default null
1111
// "args": {
1212
// "VARIANT": "focal",
13-
// "GCC_VER": "11",
14-
// "LLVM_VER": "13"
13+
// "GCC_VER": "12",
14+
// "LLVM_VER": "15"
1515
// }
1616
},
1717
"runArgs": [

0 commit comments

Comments
 (0)