mirror of
https://github.com/ETLCPP/etl.git
synced 2026-04-30 19:09:10 +08:00
Update Dockerfile and Devcontainer. (#1360)
* Print test names at test time (#1343) * Remove python3-cogapp from Dockerfile Removed python3-cogapp from the Dockerfile installation. * Update .devcontainer/Dockerfile Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Change base image and update Python package installation * Change container to use cpp devcontainer version 2 * Point to specific version of the devcontainer * Update devcontainer to use debian snapshot for reproducability * Fetch sources via https * Make devcontainer more robust for debian_snapshot * Make fetch non-https for snapshot * Install CMake from apt * Update devcontainers to remove CMake version * Change Clang version from 22 to 21 * Apply suggestion from @rolandreichweinbmw --------- Co-authored-by: Roland Reichwein <Roland.Reichwein@bmw.de> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Co-authored-by: John Wellbelove <jwellbelove@users.noreply.github.com>
This commit is contained in:
parent
3d564d68b9
commit
3c2a4d48a9
@ -1,20 +1,61 @@
|
||||
ARG BASE_IMAGE_NAME="clang:latest"
|
||||
ARG BASE_IMAGE_NAME="mcr.microsoft.com/devcontainers/cpp:2@sha256:a5eb5a1e9109af88bf82ebb0f71903608a68144851ed1e4b852e31b251ac59c6"
|
||||
|
||||
FROM ${BASE_IMAGE_NAME}
|
||||
|
||||
ARG REINSTALL_CMAKE_VERSION_FROM_SOURCE="3.31.7"
|
||||
ARG DEBIAN_SNAPSHOT="20260223T000000Z"
|
||||
|
||||
# Optionally install the cmake for vcpkg
|
||||
COPY ./reinstall-cmake.sh /tmp/
|
||||
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
|
||||
|
||||
RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
|
||||
ENV LANG=C.UTF-8 \
|
||||
LC_ALL=C.UTF-8 \
|
||||
TZ=UTC
|
||||
|
||||
RUN set -eux \
|
||||
&& export DEBIAN_FRONTEND=noninteractive \
|
||||
&& if [[ "${DEBIAN_SNAPSHOT}" != "none" ]]; then \
|
||||
snapshot_main="http://snapshot.debian.org/archive/debian/${DEBIAN_SNAPSHOT}"; \
|
||||
snapshot_security="http://snapshot.debian.org/archive/debian-security/${DEBIAN_SNAPSHOT}"; \
|
||||
if [[ -f /etc/apt/sources.list.d/debian.sources ]]; then \
|
||||
sed -ri "s|^URIs: https?://deb.debian.org/debian$|URIs: ${snapshot_main}|g" /etc/apt/sources.list.d/debian.sources; \
|
||||
sed -ri "s|^URIs: https?://deb.debian.org/debian-security$|URIs: ${snapshot_security}|g" /etc/apt/sources.list.d/debian.sources; \
|
||||
elif [[ -f /etc/apt/sources.list ]] || compgen -G "/etc/apt/sources.list.d/*.list" > /dev/null; then \
|
||||
for list_file in /etc/apt/sources.list /etc/apt/sources.list.d/*.list; do \
|
||||
[[ -f "${list_file}" ]] || continue; \
|
||||
sed -ri "s|https?://deb.debian.org/debian|${snapshot_main}|g" "${list_file}"; \
|
||||
sed -ri "s|https?://security.debian.org/debian-security|${snapshot_security}|g" "${list_file}"; \
|
||||
sed -ri "s|https?://deb.debian.org/debian-security|${snapshot_security}|g" "${list_file}"; \
|
||||
done; \
|
||||
else \
|
||||
echo "ERROR: DEBIAN_SNAPSHOT='${DEBIAN_SNAPSHOT}' is set, but no supported apt source files were found."; \
|
||||
echo "Expected /etc/apt/sources.list.d/debian.sources or one or more .list files under /etc/apt/."; \
|
||||
exit 1; \
|
||||
fi; \
|
||||
printf 'Acquire::Check-Valid-Until "false";\n' > /etc/apt/apt.conf.d/99snapshot; \
|
||||
fi \
|
||||
&& apt-get update \
|
||||
&& apt-get -y install --no-install-recommends \
|
||||
python3-full \
|
||||
python3-pip \
|
||||
git \
|
||||
wget \
|
||||
python3-cogapp \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
cmake \
|
||||
&& rm -rf /var/lib/apt/lists/* \
|
||||
&& if pip help install | grep -q '\-\-break-system-packages'; then \
|
||||
pip install --no-cache-dir --break-system-packages cogapp; \
|
||||
else \
|
||||
pip install --no-cache-dir cogapp; \
|
||||
fi
|
||||
|
||||
RUN if [ "${REINSTALL_CMAKE_VERSION_FROM_SOURCE}" != "none" ]; then \
|
||||
chmod +x /tmp/reinstall-cmake.sh && /tmp/reinstall-cmake.sh ${REINSTALL_CMAKE_VERSION_FROM_SOURCE}; \
|
||||
fi \
|
||||
&& rm -f /tmp/reinstall-cmake.sh
|
||||
RUN set -eux \
|
||||
&& echo "Pip version: " \
|
||||
&& pip --version \
|
||||
&& echo "Cogapp version: " \
|
||||
&& pip show cogapp \
|
||||
&& echo "Git version: " \
|
||||
&& git --version \
|
||||
&& echo "Wget version: " \
|
||||
&& wget --version \
|
||||
&& echo "Cmake version: " \
|
||||
&& cmake --version \
|
||||
&& echo "Make version: " \
|
||||
&& make --version
|
||||
|
||||
@ -5,7 +5,8 @@
|
||||
"build": {
|
||||
"dockerfile": "../Dockerfile",
|
||||
"args": {
|
||||
"BASE_IMAGE_NAME": "silkeh/clang:10"
|
||||
"BASE_IMAGE_NAME": "silkeh/clang:10",
|
||||
"DEBIAN_SNAPSHOT": "none"
|
||||
},
|
||||
"context": "../context"
|
||||
}
|
||||
|
||||
@ -5,7 +5,8 @@
|
||||
"build": {
|
||||
"dockerfile": "../Dockerfile",
|
||||
"args": {
|
||||
"BASE_IMAGE_NAME": "silkeh/clang:11"
|
||||
"BASE_IMAGE_NAME": "silkeh/clang:11",
|
||||
"DEBIAN_SNAPSHOT": "none"
|
||||
},
|
||||
"context": "../context"
|
||||
}
|
||||
|
||||
@ -5,7 +5,8 @@
|
||||
"build": {
|
||||
"dockerfile": "../Dockerfile",
|
||||
"args": {
|
||||
"BASE_IMAGE_NAME": "silkeh/clang:12"
|
||||
"BASE_IMAGE_NAME": "silkeh/clang:12",
|
||||
"DEBIAN_SNAPSHOT": "none"
|
||||
},
|
||||
"context": "../context"
|
||||
}
|
||||
|
||||
@ -5,7 +5,8 @@
|
||||
"build": {
|
||||
"dockerfile": "../Dockerfile",
|
||||
"args": {
|
||||
"BASE_IMAGE_NAME": "silkeh/clang:13"
|
||||
"BASE_IMAGE_NAME": "silkeh/clang:13",
|
||||
"DEBIAN_SNAPSHOT": "none"
|
||||
},
|
||||
"context": "../context"
|
||||
}
|
||||
|
||||
@ -5,7 +5,8 @@
|
||||
"build": {
|
||||
"dockerfile": "../Dockerfile",
|
||||
"args": {
|
||||
"BASE_IMAGE_NAME": "silkeh/clang:14"
|
||||
"BASE_IMAGE_NAME": "silkeh/clang:14",
|
||||
"DEBIAN_SNAPSHOT": "none"
|
||||
},
|
||||
"context": "../context"
|
||||
}
|
||||
|
||||
@ -5,7 +5,8 @@
|
||||
"build": {
|
||||
"dockerfile": "../Dockerfile",
|
||||
"args": {
|
||||
"BASE_IMAGE_NAME": "silkeh/clang:15"
|
||||
"BASE_IMAGE_NAME": "silkeh/clang:15",
|
||||
"DEBIAN_SNAPSHOT": "none"
|
||||
},
|
||||
"context": "../context"
|
||||
}
|
||||
|
||||
@ -5,7 +5,8 @@
|
||||
"build": {
|
||||
"dockerfile": "../Dockerfile",
|
||||
"args": {
|
||||
"BASE_IMAGE_NAME": "silkeh/clang:16"
|
||||
"BASE_IMAGE_NAME": "silkeh/clang:16",
|
||||
"DEBIAN_SNAPSHOT": "none"
|
||||
},
|
||||
"context": "../context"
|
||||
}
|
||||
|
||||
@ -5,7 +5,8 @@
|
||||
"build": {
|
||||
"dockerfile": "../Dockerfile",
|
||||
"args": {
|
||||
"BASE_IMAGE_NAME": "silkeh/clang:17"
|
||||
"BASE_IMAGE_NAME": "silkeh/clang:17",
|
||||
"DEBIAN_SNAPSHOT": "none"
|
||||
},
|
||||
"context": "../context"
|
||||
}
|
||||
|
||||
@ -5,7 +5,8 @@
|
||||
"build": {
|
||||
"dockerfile": "../Dockerfile",
|
||||
"args": {
|
||||
"BASE_IMAGE_NAME": "silkeh/clang:18-bullseye"
|
||||
"BASE_IMAGE_NAME": "silkeh/clang:18-bullseye",
|
||||
"DEBIAN_SNAPSHOT": "none"
|
||||
},
|
||||
"context": "../context"
|
||||
}
|
||||
|
||||
@ -5,7 +5,8 @@
|
||||
"build": {
|
||||
"dockerfile": "../Dockerfile",
|
||||
"args": {
|
||||
"BASE_IMAGE_NAME": "silkeh/clang:19-bullseye"
|
||||
"BASE_IMAGE_NAME": "silkeh/clang:19-bullseye",
|
||||
"DEBIAN_SNAPSHOT": "none"
|
||||
},
|
||||
"context": "../context"
|
||||
}
|
||||
|
||||
@ -5,7 +5,8 @@
|
||||
"build": {
|
||||
"dockerfile": "../Dockerfile",
|
||||
"args": {
|
||||
"BASE_IMAGE_NAME": "silkeh/clang:20-bullseye"
|
||||
"BASE_IMAGE_NAME": "silkeh/clang:20-bullseye",
|
||||
"DEBIAN_SNAPSHOT": "none"
|
||||
},
|
||||
"context": "../context"
|
||||
}
|
||||
|
||||
13
.devcontainer/clang21/devcontainer.json
Normal file
13
.devcontainer/clang21/devcontainer.json
Normal file
@ -0,0 +1,13 @@
|
||||
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
|
||||
// README at: https://github.com/devcontainers/templates/tree/main/src/cpp
|
||||
{
|
||||
"name": "Clang 21",
|
||||
"build": {
|
||||
"dockerfile": "../Dockerfile",
|
||||
"args": {
|
||||
"BASE_IMAGE_NAME": "silkeh/clang:21-bullseye",
|
||||
"DEBIAN_SNAPSHOT": "none"
|
||||
},
|
||||
"context": "../context"
|
||||
}
|
||||
}
|
||||
@ -5,7 +5,8 @@
|
||||
"build": {
|
||||
"dockerfile": "../Dockerfile",
|
||||
"args": {
|
||||
"BASE_IMAGE_NAME": "silkeh/clang:7"
|
||||
"BASE_IMAGE_NAME": "silkeh/clang:7",
|
||||
"DEBIAN_SNAPSHOT": "none"
|
||||
},
|
||||
"context": "../context"
|
||||
}
|
||||
|
||||
@ -5,7 +5,8 @@
|
||||
"build": {
|
||||
"dockerfile": "../Dockerfile",
|
||||
"args": {
|
||||
"BASE_IMAGE_NAME": "silkeh/clang:8"
|
||||
"BASE_IMAGE_NAME": "silkeh/clang:8",
|
||||
"DEBIAN_SNAPSHOT": "none"
|
||||
},
|
||||
"context": "../context"
|
||||
}
|
||||
|
||||
@ -5,7 +5,8 @@
|
||||
"build": {
|
||||
"dockerfile": "../Dockerfile",
|
||||
"args": {
|
||||
"BASE_IMAGE_NAME": "silkeh/clang:9"
|
||||
"BASE_IMAGE_NAME": "silkeh/clang:9",
|
||||
"DEBIAN_SNAPSHOT": "none"
|
||||
},
|
||||
"context": "../context"
|
||||
}
|
||||
|
||||
@ -5,7 +5,8 @@
|
||||
"build": {
|
||||
"dockerfile": "./Dockerfile",
|
||||
"args": {
|
||||
"BASE_IMAGE_NAME": "mcr.microsoft.com/devcontainers/cpp:debian-12"
|
||||
"BASE_IMAGE_NAME": "mcr.microsoft.com/devcontainers/cpp:2@sha256:a5eb5a1e9109af88bf82ebb0f71903608a68144851ed1e4b852e31b251ac59c6",
|
||||
"DEBIAN_SNAPSHOT": "20260223T000000Z"
|
||||
},
|
||||
"context": "./context"
|
||||
}
|
||||
|
||||
@ -5,7 +5,8 @@
|
||||
"build": {
|
||||
"dockerfile": "../Dockerfile",
|
||||
"args": {
|
||||
"BASE_IMAGE_NAME": "gcc:9"
|
||||
"BASE_IMAGE_NAME": "gcc:9",
|
||||
"DEBIAN_SNAPSHOT": "none"
|
||||
},
|
||||
"context": "../context"
|
||||
}
|
||||
|
||||
@ -5,7 +5,8 @@
|
||||
"build": {
|
||||
"dockerfile": "../Dockerfile",
|
||||
"args": {
|
||||
"BASE_IMAGE_NAME": "gcc:10"
|
||||
"BASE_IMAGE_NAME": "gcc:10",
|
||||
"DEBIAN_SNAPSHOT": "none"
|
||||
},
|
||||
"context": "../context"
|
||||
}
|
||||
|
||||
@ -5,7 +5,8 @@
|
||||
"build": {
|
||||
"dockerfile": "../Dockerfile",
|
||||
"args": {
|
||||
"BASE_IMAGE_NAME": "gcc:11"
|
||||
"BASE_IMAGE_NAME": "gcc:11",
|
||||
"DEBIAN_SNAPSHOT": "none"
|
||||
},
|
||||
"context": "../context"
|
||||
}
|
||||
|
||||
@ -5,7 +5,8 @@
|
||||
"build": {
|
||||
"dockerfile": "../Dockerfile",
|
||||
"args": {
|
||||
"BASE_IMAGE_NAME": "gcc:12"
|
||||
"BASE_IMAGE_NAME": "gcc:12",
|
||||
"DEBIAN_SNAPSHOT": "none"
|
||||
},
|
||||
"context": "../context"
|
||||
}
|
||||
|
||||
@ -5,7 +5,8 @@
|
||||
"build": {
|
||||
"dockerfile": "../Dockerfile",
|
||||
"args": {
|
||||
"BASE_IMAGE_NAME": "gcc:13"
|
||||
"BASE_IMAGE_NAME": "gcc:13",
|
||||
"DEBIAN_SNAPSHOT": "none"
|
||||
},
|
||||
"context": "../context"
|
||||
}
|
||||
|
||||
@ -5,7 +5,8 @@
|
||||
"build": {
|
||||
"dockerfile": "../Dockerfile",
|
||||
"args": {
|
||||
"BASE_IMAGE_NAME": "gcc:14"
|
||||
"BASE_IMAGE_NAME": "gcc:14",
|
||||
"DEBIAN_SNAPSHOT": "none"
|
||||
},
|
||||
"context": "../context"
|
||||
}
|
||||
|
||||
@ -5,7 +5,8 @@
|
||||
"build": {
|
||||
"dockerfile": "../Dockerfile",
|
||||
"args": {
|
||||
"BASE_IMAGE_NAME": "gcc:15"
|
||||
"BASE_IMAGE_NAME": "gcc:15",
|
||||
"DEBIAN_SNAPSHOT": "none"
|
||||
},
|
||||
"context": "../context"
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user