-
Notifications
You must be signed in to change notification settings - Fork 400
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[docker-outside-of-docker] - Fix externally-managed-environment pytho…
…n error for "bookworm" - solution to issue #1120 (#1121) * [docker-outside-of-docker] - solution to issue #1120 * minor changes * err fn addition * changes as required * Update src/docker-outside-of-docker/devcontainer-feature.json Co-authored-by: Samruddhi Khandale <samruddhikhandale@github.com> * remove debugging code * missed this change * reverting changes * keeping docker_compose_install to be false for v1 installs * changes as requested * changes as required --------- Co-authored-by: Samruddhi Khandale <samruddhikhandale@github.com>
- Loading branch information
1 parent
1a6b715
commit f02df17
Showing
7 changed files
with
202 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
29 changes: 29 additions & 0 deletions
29
test/docker-outside-of-docker/docker_install_compose_switch.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
#!/bin/bash | ||
|
||
set -e | ||
|
||
# Optional: Import test library | ||
source dev-container-features-test-lib | ||
|
||
# Check if compose-switch is installed | ||
check_compose_switch_installation() { | ||
COMPOSE_SWITCH_BINARY="/usr/local/bin/compose-switch" | ||
# Check if the binary exists | ||
if [ ! -x "$COMPOSE_SWITCH_BINARY" ]; then | ||
echo "compose-switch binary not found at $COMPOSE_SWITCH_BINARY" | ||
exit 1 | ||
else | ||
compose_switch_version=$("$COMPOSE_SWITCH_BINARY" --version | awk '{print $4}') | ||
if [ -z "$compose_switch_version" ]; then | ||
echo "Unable to determine compose-switch version" | ||
else | ||
echo "compose-switch version: $compose_switch_version" | ||
echo -e "\n✅ compose-switch is installed" | ||
fi | ||
fi | ||
} | ||
|
||
check "Check whether compose-switch is installed" check_compose_switch_installation | ||
|
||
reportResults | ||
|
29 changes: 29 additions & 0 deletions
29
test/docker-outside-of-docker/docker_not_install_compose_switch.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
#!/bin/bash | ||
|
||
set -e | ||
|
||
# Optional: Import test library | ||
source dev-container-features-test-lib | ||
|
||
# Check if compose-switch is installed | ||
check_compose_switch_installation() { | ||
COMPOSE_SWITCH_BINARY="/usr/local/bin/compose-switch" | ||
# Check if the binary exists | ||
if [ ! -x "$COMPOSE_SWITCH_BINARY" ]; then | ||
echo "compose-switch binary not found at $COMPOSE_SWITCH_BINARY" | ||
echo -e "\n❎ compose-switch is not installed" | ||
else | ||
compose_switch_version=$("$COMPOSE_SWITCH_BINARY" --version | awk '{print $4}') | ||
if [ -z "$compose_switch_version" ]; then | ||
echo "Unable to determine compose-switch version" | ||
else | ||
echo "compose-switch version: $compose_switch_version" | ||
fi | ||
exit 1 | ||
fi | ||
} | ||
|
||
check "Check whether compose-switch is installed" check_compose_switch_installation | ||
|
||
reportResults | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
#!/bin/bash | ||
|
||
set -e | ||
|
||
# Optional: Import test library | ||
source dev-container-features-test-lib | ||
|
||
# Definition specific tests | ||
check "docker-buildx" bash -c "docker buildx version" | ||
check "docker-buildx-path" bash -c "ls -la /usr/libexec/docker/cli-plugins/docker-buildx" | ||
|
||
check "docker-buildx" docker buildx version | ||
check "docker-build" docker build ./ | ||
|
||
check "installs docker-compose v2 install" bash -c "type docker-compose" | ||
check "docker compose" bash -c "docker compose version | grep -E '2.[0-9]+.[0-9]+'" | ||
check "docker-compose" bash -c "docker-compose --version | grep -E '2.[0-9]+.[0-9]+'" | ||
|
||
check "installs compose-switch as docker-compose" bash -c "[[ -f /usr/local/bin/docker-compose ]]" | ||
|
||
# Report result | ||
reportResults |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters