Skip to content

Commit 80645f8

Browse files
authored
Merge branch 'main' into copilot/unify-user-selection-logic
2 parents 9805b98 + 0292aee commit 80645f8

21 files changed

Lines changed: 193 additions & 103 deletions

src/common-utils/main.sh

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -378,14 +378,6 @@ if [ "${ADJUSTED_ID}" = "rhel" ] && [ "${VERSION_CODENAME-}" = "centos7" ]; then
378378
sed -i s/^mirrorlist=http/#mirrorlist=http/g /etc/yum.repos.d/*.repo
379379
fi
380380

381-
if [ "${ADJUSTED_ID}" = "rhel" ] && [ "${VERSION_CODENAME-}" = "centos7" ]; then
382-
# As of 1 July 2024, mirrorlist.centos.org no longer exists.
383-
# Update the repo files to reference vault.centos.org.
384-
sed -i s/mirror.centos.org/vault.centos.org/g /etc/yum.repos.d/*.repo
385-
sed -i s/^#.*baseurl=http/baseurl=http/g /etc/yum.repos.d/*.repo
386-
sed -i s/^mirrorlist=http/#mirrorlist=http/g /etc/yum.repos.d/*.repo
387-
fi
388-
389381
# Install packages for appropriate OS
390382
case "${ADJUSTED_ID}" in
391383
"debian")

src/docker-in-docker/devcontainer-feature.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"id": "docker-in-docker",
3-
"version": "2.16.0",
3+
"version": "2.16.1",
44
"name": "Docker (Docker-in-Docker)",
55
"documentationURL": "https://github.com/devcontainers/features/tree/main/src/docker-in-docker",
66
"description": "Create child containers *inside* a container, independent from the host's docker instance. Installs Docker extension in the container along with needed CLIs.",

src/docker-in-docker/install.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -851,6 +851,10 @@ if [ "$DISABLE_IP6_TABLES" == true ]; then
851851
fi
852852
fi
853853

854+
if [ ! -d /usr/local/share ]; then
855+
mkdir -p /usr/local/share
856+
fi
857+
854858
tee /usr/local/share/docker-init.sh > /dev/null \
855859
<< EOF
856860
#!/bin/sh

src/docker-outside-of-docker/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ Re-use the host docker socket, adding the Docker CLI to a container. Feature inv
2020
| version | Select or enter a Docker/Moby CLI version. (Availability can vary by OS version.) | string | latest |
2121
| moby | Install OSS Moby build instead of Docker CE | boolean | true |
2222
| mobyBuildxVersion | Install a specific version of moby-buildx when using Moby | string | latest |
23-
| dockerDashComposeVersion | Compose version to use for docker-compose (v1 or v2 or none) | string | v2 |
23+
| dockerDashComposeVersion | Compose version to use for docker-compose (v1 or v2 or none or latest) | string | latest |
2424
| installDockerBuildx | Install Docker Buildx | boolean | true |
2525
| installDockerComposeSwitch | Install Compose Switch (provided docker compose is available) which is a replacement to the Compose V1 docker-compose (python) executable. It translates the command line into Compose V2 docker compose then runs the latter. | boolean | true |
2626

src/docker-outside-of-docker/devcontainer-feature.json

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{
2+
23
"id": "docker-outside-of-docker",
3-
"version": "1.8.0",
4+
"version": "1.9.0",
45
"name": "Docker (docker-outside-of-docker)",
56
"documentationURL": "https://github.com/devcontainers/features/tree/main/src/docker-outside-of-docker",
67
"description": "Re-use the host docker socket, adding the Docker CLI to a container. Feature invokes a script to enable using a forwarded Docker socket within a container to run Docker commands.",
@@ -29,11 +30,12 @@
2930
"type": "string",
3031
"enum": [
3132
"none",
33+
"latest",
3234
"v1",
3335
"v2"
3436
],
35-
"default": "v2",
36-
"description": "Compose version to use for docker-compose (v1 or v2 or none)"
37+
"default": "latest",
38+
"description": "Compose version to use for docker-compose (v1 or v2 or none or latest)"
3739
},
3840
"installDockerBuildx": {
3941
"type": "boolean",

src/docker-outside-of-docker/install.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
DOCKER_VERSION="${VERSION:-"latest"}"
1111
USE_MOBY="${MOBY:-"true"}"
1212
MOBY_BUILDX_VERSION="${MOBYBUILDXVERSION:-"latest"}"
13-
DOCKER_DASH_COMPOSE_VERSION="${DOCKERDASHCOMPOSEVERSION:-"v2"}" # v1 or v2 or none
13+
DOCKER_DASH_COMPOSE_VERSION="${DOCKERDASHCOMPOSEVERSION:-"latest"}" # v1 or v2 or none or latest
1414

1515
ENABLE_NONROOT_DOCKER="${ENABLE_NONROOT_DOCKER:-"true"}"
1616
SOURCE_SOCKET="${SOURCE_SOCKET:-"/var/run/docker-host.sock"}"

src/dotnet/NOTES.md

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ Installing only the .NET Runtime or the ASP.NET Core Runtime. (The SDK includes
5757
"ghcr.io/devcontainers/features/dotnet:2": {
5858
"version": "none",
5959
"dotnetRuntimeVersions": "latest, lts",
60-
"aspnetCoreRuntimeVersions": "latest, lts",
60+
"aspNetCoreRuntimeVersions": "latest, lts",
6161
}
6262
}
6363
```
@@ -67,7 +67,7 @@ Installing .NET workloads. Multiple workloads can be specified as comma-separate
6767
``` json
6868
"features": {
6969
"ghcr.io/devcontainers/features/dotnet:2": {
70-
"workloads": "aspire, wasm-tools"
70+
"workloads": "wasm-tools"
7171
}
7272
}
7373
```
@@ -80,7 +80,7 @@ Installing prerelease builds. Supports `preview` and `daily` suffixes.
8080
"version": "10.0-preview",
8181
"additionalVersions": "10.0.1xx-daily",
8282
"dotnetRuntimeVersions": "10.0-daily",
83-
"aspnetCoreRuntimeVersions": "10.0-daily"
83+
"aspNetCoreRuntimeVersions": "10.0-daily"
8484
}
8585
}
8686
```
@@ -90,3 +90,21 @@ Installing prerelease builds. Supports `preview` and `daily` suffixes.
9090
This Feature should work on recent versions of Debian/Ubuntu-based distributions with the `apt` package manager installed.
9191

9292
`bash` is required to execute the `install.sh` script.
93+
94+
## Tab completions
95+
96+
When using .NET SDK 10 or newer, tab completions for the `dotnet` CLI are automatically installed for bash, zsh, and fish. The completion scripts are placed in the standard system-wide directories so they work for all users:
97+
98+
- **Bash**: `/usr/share/bash-completion/completions/dotnet`
99+
- **Zsh**: `/usr/share/zsh/site-functions/_dotnet`
100+
- **Fish**: `/usr/share/fish/vendor_completions.d/dotnet.fish`
101+
102+
To disable this, set `tabCompletions` to `false`:
103+
104+
``` json
105+
"features": {
106+
"ghcr.io/devcontainers/features/dotnet:2": {
107+
"tabCompletions": false
108+
}
109+
}
110+
```

src/dotnet/README.md

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,12 @@ This Feature installs the latest .NET SDK, which includes the .NET CLI and the s
1515

1616
| Options Id | Description | Type | Default Value |
1717
|-----|-----|-----|-----|
18-
| version | Select or enter a .NET SDK version. Use 'latest' for the latest version, 'lts' for the latest LTS version, 'X.Y' or 'X.Y.Z' for a specific version. | string | latest |
19-
| additionalVersions | Enter additional .NET SDK versions, separated by commas. Use 'latest' for the latest version, 'lts' for the latest LTS version, 'X.Y' or 'X.Y.Z' for a specific version. | string | - |
20-
| dotnetRuntimeVersions | Enter additional .NET runtime versions, separated by commas. Use 'latest' for the latest version, 'lts' for the latest LTS version, 'X.Y' or 'X.Y.Z' for a specific version. | string | - |
21-
| aspNetCoreRuntimeVersions | Enter additional ASP.NET Core runtime versions, separated by commas. Use 'latest' for the latest version, 'lts' for the latest LTS version, 'X.Y' or 'X.Y.Z' for a specific version. | string | - |
18+
| version | Select or enter a .NET SDK version. Use 'latest' for the latest version, 'lts' for the latest LTS version, 'X.Y' or 'X.Y.Z' for a specific version, 'X.Y-preview' or 'X.Y-daily' for prereleases. | string | latest |
19+
| additionalVersions | Enter additional .NET SDK versions, separated by commas. Use 'latest' for the latest version, 'lts' for the latest LTS version, 'X.Y' or 'X.Y.Z' for a specific version, 'X.Y-preview' or 'X.Y-daily' for prereleases. | string | - |
20+
| dotnetRuntimeVersions | Enter additional .NET runtime versions, separated by commas. Use 'latest' for the latest version, 'lts' for the latest LTS version, 'X.Y' or 'X.Y.Z' for a specific version, 'X.Y-preview' or 'X.Y-daily' for prereleases. | string | - |
21+
| aspNetCoreRuntimeVersions | Enter additional ASP.NET Core runtime versions, separated by commas. Use 'latest' for the latest version, 'lts' for the latest LTS version, 'X.Y' or 'X.Y.Z' for a specific version, 'X.Y-preview' or 'X.Y-daily' for prereleases. | string | - |
2222
| workloads | Enter additional .NET SDK workloads, separated by commas. Use 'dotnet workload search' to learn what workloads are available to install. | string | - |
23+
| tabCompletions | Install shell tab completions for the dotnet CLI. Requires SDK 10 or newer. | boolean | true |
2324

2425
## Customizations
2526

@@ -85,7 +86,7 @@ Installing only the .NET Runtime or the ASP.NET Core Runtime. (The SDK includes
8586
"ghcr.io/devcontainers/features/dotnet:2": {
8687
"version": "none",
8788
"dotnetRuntimeVersions": "latest, lts",
88-
"aspnetCoreRuntimeVersions": "latest, lts",
89+
"aspNetCoreRuntimeVersions": "latest, lts",
8990
}
9091
}
9192
```
@@ -95,7 +96,7 @@ Installing .NET workloads. Multiple workloads can be specified as comma-separate
9596
``` json
9697
"features": {
9798
"ghcr.io/devcontainers/features/dotnet:2": {
98-
"workloads": "aspire, wasm-tools"
99+
"workloads": "wasm-tools"
99100
}
100101
}
101102
```

src/dotnet/devcontainer-feature.json

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"id": "dotnet",
3-
"version": "2.4.2",
3+
"version": "2.5.0",
44
"name": "Dotnet CLI",
55
"documentationURL": "https://github.com/devcontainers/features/tree/main/src/dotnet",
66
"description": "This Feature installs the latest .NET SDK, which includes the .NET CLI and the shared runtime. Options are provided to choose a different version or additional versions.",
@@ -39,6 +39,11 @@
3939
"type": "string",
4040
"default": "",
4141
"description": "Enter additional .NET SDK workloads, separated by commas. Use 'dotnet workload search' to learn what workloads are available to install."
42+
},
43+
"tabCompletions": {
44+
"type": "boolean",
45+
"default": true,
46+
"description": "Install shell tab completions for the dotnet CLI. Requires SDK 10 or newer."
4247
}
4348
},
4449
"containerEnv": {
@@ -64,4 +69,4 @@
6469
"installsAfter": [
6570
"ghcr.io/devcontainers/features/common-utils"
6671
]
67-
}
72+
}

src/dotnet/install.sh

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ ADDITIONAL_VERSIONS="${ADDITIONALVERSIONS:-""}"
1111
DOTNET_RUNTIME_VERSIONS="${DOTNETRUNTIMEVERSIONS:-""}"
1212
ASPNETCORE_RUNTIME_VERSIONS="${ASPNETCORERUNTIMEVERSIONS:-""}"
1313
WORKLOADS="${WORKLOADS:-""}"
14+
TAB_COMPLETIONS="${TABCOMPLETIONS:-"true"}"
1415

1516
# Prevent "Welcome to .NET" message from dotnet
1617
export DOTNET_NOLOGO=true
@@ -105,7 +106,7 @@ done
105106

106107
# Install .NET versions and dependencies
107108
# icu-devtools includes dependencies for .NET
108-
check_packages wget ca-certificates icu-devtools
109+
check_packages wget ca-certificates icu-devtools jq
109110

110111
for version in "${versions[@]}"; do
111112
read -r clean_version quality < <(parse_version_and_quality "$version")
@@ -146,6 +147,10 @@ if [ ! -e /usr/bin/dotnet ]; then
146147
ln --symbolic "$DOTNET_ROOT/dotnet" /usr/bin/dotnet
147148
fi
148149

150+
if [ "$TAB_COMPLETIONS" = "true" ]; then
151+
install_completions
152+
fi
153+
149154
# Add .NET Core SDK tools to PATH for bash and zsh users
150155
# This is where 'dotnet tool install --global <tool>' installs tools to
151156
# Use single-quoted EOF to defer $PATH expansion until sourcing the file

0 commit comments

Comments
 (0)