Skip to content

Commit eaa1c4e

Browse files
authored
feat: remove docker cli from amp-devcontainer-cpp (#832)
* feat: remove docker cli from amp-devcontainer-cpp * chore: remove tests for docker cli
1 parent fcc3527 commit eaa1c4e

File tree

4 files changed

+5
-23
lines changed

4 files changed

+5
-23
lines changed

.devcontainer/cpp/Dockerfile

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ ARG BATS_VERSION=1.11.0
44
ARG CCACHE_VERSION=4.11
55
ARG CLANG_VERSION=18
66
ARG CPM_VERSION=0.40.2
7-
ARG DOCKER_VERSION=27.3.1
87
ARG INCLUDE_WHAT_YOU_USE_VERSION=0.22
98
ARG XWIN_VERSION=0.6.5
109

@@ -32,11 +31,11 @@ RUN python3 -m pip install --break-system-packages --require-hashes --no-cache-d
3231
&& rm -rf /tmp/requirements.txt
3332

3433
# Set default environment options for CMake and ccache
35-
ENV CCACHE_DIR=/cache/.ccache
36-
ENV CMAKE_EXPORT_COMPILE_COMMANDS="On"
37-
ENV CMAKE_GENERATOR="Ninja"
38-
ENV CONAN_HOME=/opt/conan
39-
ENV CPM_SOURCE_CACHE=/cache/.cpm-cache
34+
ENV CCACHE_DIR=/cache/.ccache \
35+
CMAKE_EXPORT_COMPILE_COMMANDS="On" \
36+
CMAKE_GENERATOR="Ninja" \
37+
CONAN_HOME=/opt/conan \
38+
CPM_SOURCE_CACHE=/cache/.cpm-cache
4039

4140
# Install clang toolchain and mull mutation testing framework
4241
COPY .devcontainer/cpp/apt-requirements-clang.json /tmp/apt-requirements-clang.json
@@ -58,11 +57,6 @@ RUN mkdir /opt/gcc-arm-none-eabi \
5857
&& wget -qO - "https://developer.arm.com/-/media/Files/downloads/gnu/14.2.rel1/binrel/arm-gnu-toolchain-14.2.rel1-$(uname -m)-arm-none-eabi.tar.xz" | tar --exclude='*arm-none-eabi-gdb*' --exclude='share' --strip-components=1 -xJC /opt/gcc-arm-none-eabi
5958
ENV PATH="$PATH:/opt/gcc-arm-none-eabi/bin"
6059

61-
# Install docker-cli for Docker-from-Docker tools
62-
RUN wget -qO - "https://download.docker.com/linux/static/stable/$(uname -m)/docker-${DOCKER_VERSION}.tgz" | tar xz -C /tmp \
63-
&& mv /tmp/docker/docker /usr/local/bin/ \
64-
&& rm -rf /tmp/docker
65-
6660
# Install bats
6761
RUN batstmp="$(mktemp -d /tmp/bats-core-${BATS_VERSION}.XXXX)" \
6862
&& wget -qO - https://github.com/bats-core/bats-core/archive/refs/tags/v${BATS_VERSION}.tar.gz | tar xz -C "${batstmp}" \

.devcontainer/cpp/devcontainer.json

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,6 @@
88
"CONTAINER_FLAVOR": "cpp",
99
"NODE_EXTRA_CA_CERTS": "/usr/local/share/ca-certificates/Cisco_Umbrella_Root_CA.crt"
1010
},
11-
"mounts": [
12-
"source=/var/run/docker.sock,target=/var/run/docker.sock,type=bind"
13-
],
1411
"features": {
1512
"ghcr.io/devcontainers/features/desktop-lite:1": {},
1613
"ghcr.io/devcontainers/features/github-cli:1": {},

.devcontainer/rust/devcontainer.json

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,6 @@
77
"remoteEnv": {
88
"CONTAINER_FLAVOR": "rust"
99
},
10-
"mounts": [
11-
"source=/var/run/docker.sock,target=/var/run/docker.sock,type=bind"
12-
],
1310
"customizations": {
1411
"vscode": {
1512
"settings": {

test/cpp/integration-tests.bats

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -190,12 +190,6 @@ teardown() {
190190
assert_output "Hello World!"
191191
}
192192

193-
@test "when the docker socket is mounted, using the docker cli should give access to the host docker daemon" {
194-
run docker info
195-
assert_success
196-
assert_output --partial "Server Version:"
197-
}
198-
199193
@test "sanitizers should detect undefined or suspicious behavior in code compiled with gcc" {
200194
build_and_run_with_sanitizers gcc
201195
}

0 commit comments

Comments
 (0)