Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/common-utils/NOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ In addition to the common CLI tools (curl, wget, git, jq, nano, vim, etc.), this
- **iptables** - tools for configuring packet filtering and NAT rules used by sandbox networking.
- **socat** — a multipurpose relay for bidirectional data transfer between two independent data channels (e.g., sockets, files, pipes).

On RPM-based distributions, bubblewrap and slirp4netns are installed only when available in the configured repositories.
On RPM-based distributions, bubblewrap and slirp4netns are installed only when available in the configured repositories. iptables is not installed on EL10 images because it is not available in UBI 10 minimal.

## Using with dev container images

Expand Down
2 changes: 1 addition & 1 deletion src/common-utils/devcontainer-feature.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"id": "common-utils",
"version": "2.7.1",
"version": "2.7.2",
"name": "Common Utilities",
"documentationURL": "https://github.com/devcontainers/features/tree/main/src/common-utils",
"description": "Installs a set of common command line utilities, Oh My Zsh!, and sets up a non-root user.",
Expand Down
6 changes: 5 additions & 1 deletion src/common-utils/main.sh
Original file line number Diff line number Diff line change
Expand Up @@ -223,9 +223,13 @@ install_redhat_packages() {
man-db \
strace \
util-linux \
iptables \
socat"

# UBI 10 minimal does not provide iptables.
if [[ "${ID}" != "rhel" || "${VERSION_ID}" != 10* ]]; then

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will break with RHEL 11.

${VERSION_ID%%.*} -ge 10

package_list="${package_list} iptables"
fi

# rockylinux:9 installs 'curl-minimal' which clashes with 'curl'
# Install 'curl' for every OS except this rockylinux:9
if [[ "${ID}" = "rocky" ]] && [[ "${VERSION}" != *"9."* ]]; then
Expand Down
7 changes: 7 additions & 0 deletions test/common-utils/scenarios.json
Original file line number Diff line number Diff line change
Expand Up @@ -339,5 +339,12 @@
"features": {
"common-utils": {}
}
},
"ubi-10-minimal": {
"image": "registry.access.redhat.com/ubi10/ubi-minimal:10.0",
"remoteUser": "devcontainer",
"features": {
"common-utils": {}
}
}
}
17 changes: 17 additions & 0 deletions test/common-utils/ubi-10-minimal.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/bin/bash

set -e

# Optional: Import test library
source dev-container-features-test-lib

# Definition specific tests
. /etc/os-release
check "non-root user" test "$(whoami)" = "devcontainer"
check "distro" test "${PLATFORM_ID}" = "platform:el10"
check "curl" curl --version
check "jq" jq --version
check "util-linux" unshare --version

# Report result
reportResults
Loading