Skip to content
Merged
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
13 changes: 11 additions & 2 deletions .github/actions/smoke-test/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,25 @@ inputs:
template:
description: 'Template to test'
required: true
runtime-version:
description: 'Runtime version to test (defaults to the template default)'
required: false

runs:
using: composite
steps:
- name: Build template
id: build_template
shell: bash
run: ${{ github.action_path }}/build.sh ${{ inputs.template }}
env:
TEMPLATE_ID: ${{ inputs.template }}
RUNTIME_VERSION: ${{ inputs.runtime-version }}
run: bash "${{ github.action_path }}/build.sh" "${TEMPLATE_ID}"

- name: Test template
id: test_template
shell: bash
run: ${{ github.action_path }}/test.sh ${{ inputs.template }}
env:
TEMPLATE_ID: ${{ inputs.template }}
RUNTIME_VERSION: ${{ inputs.runtime-version }}
run: bash "${{ github.action_path }}/test.sh" "${TEMPLATE_ID}"
8 changes: 7 additions & 1 deletion .github/actions/smoke-test/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,10 @@ npm install -g @devcontainers/cli
PREBUILD_DIR="prebuild/${TEMPLATE_ID}"
if [ -d "${PREBUILD_DIR}" ] ; then
RUNTIME_OPTION=$(jq -r '.options | keys[] | select(. != "azureFunctionsCliVersion")' "src/${TEMPLATE_ID}/devcontainer-template.json")
RUNTIME_VERSION=$(jq -r ".options | .${RUNTIME_OPTION} | .default" "src/${TEMPLATE_ID}/devcontainer-template.json")
RUNTIME_VERSION=${RUNTIME_VERSION:-$(jq -r ".options | .${RUNTIME_OPTION} | .default" "src/${TEMPLATE_ID}/devcontainer-template.json")}
jq -e --arg option "${RUNTIME_OPTION}" --arg version "${RUNTIME_VERSION}" \
'.options[$option].proposals | index($version) != null' \
"src/${TEMPLATE_ID}/devcontainer-template.json" > /dev/null
PREBUILD_IMAGE="ghcr.io/shibayan/devcontainers/${TEMPLATE_ID}-base:${RUNTIME_VERSION}-noble"

if [ -z "${RUNTIME_OPTION}" ] || [ -z "${RUNTIME_VERSION}" ] || [ "${RUNTIME_VERSION}" = "null" ] ; then
Expand All @@ -42,6 +45,9 @@ if [ "${OPTION_PROPERTY}" != "" ] && [ "${OPTION_PROPERTY}" != "null" ] ; then
do
OPTION_KEY="\${templateOption:$OPTION}"
OPTION_VALUE=$(jq -r ".options | .${OPTION} | .default" devcontainer-template.json)
if [ "${OPTION}" = "${RUNTIME_OPTION}" ]; then
OPTION_VALUE="${RUNTIME_VERSION}"
fi

if [ "${OPTION_VALUE}" = "" ] || [ "${OPTION_VALUE}" = "null" ] ; then
echo "Template '${TEMPLATE_ID}' is missing a default value for option '${OPTION}'"
Expand Down
21 changes: 17 additions & 4 deletions .github/actions/smoke-test/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,21 @@ SRC_DIR="/tmp/${TEMPLATE_ID}"
echo "Running Smoke Test"

ID_LABEL="test-container=${TEMPLATE_ID}"
devcontainer exec --workspace-folder "${SRC_DIR}" --id-label ${ID_LABEL} /bin/sh -c 'set -e && if [ -f "test-project/test.sh" ]; then cd test-project && if [ "$(id -u)" = "0" ]; then chmod +x test.sh; else sudo chmod +x test.sh; fi && ./test.sh; else ls -a; fi'
cleanup() {
status=$?
trap - EXIT
container=$(docker ps -aq --filter "label=${ID_LABEL}" | head -n1) || true
if [ -n "${container}" ]; then
project=$(docker inspect --format '{{ index .Config.Labels "com.docker.compose.project" }}' "${container}") || true
if [ -n "${project}" ]; then
docker compose --project-name "${project}" -f "${SRC_DIR}/.devcontainer/docker-compose.yml" down --volumes || true
fi
fi
rm -rf "${SRC_DIR}"
exit "${status}"
}
trap cleanup EXIT

# Clean up
docker rm -f $(docker container ls -f "label=${ID_LABEL}" -q)
rm -rf "${SRC_DIR}"
devcontainer exec --workspace-folder "${SRC_DIR}" --id-label "${ID_LABEL}" \
--remote-env "EXPECTED_RUNTIME_VERSION=${RUNTIME_VERSION:-}" \
/bin/bash -c 'set -e; cd test-project; bash test.sh'
32 changes: 28 additions & 4 deletions .github/workflows/test-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,10 @@ jobs:
detect-changes:
runs-on: ubuntu-latest
outputs:
templates: ${{ steps.filter.outputs.changes }}
configs: ${{ steps.matrix.outputs.configs }}
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1

- uses: dorny/paths-filter@ceb8a2b8f2d89434be7ff52d3de7ec3738c5cc9d # v4.0.3
id: filter
with:
Expand Down Expand Up @@ -49,18 +51,40 @@ jobs:
- test/test-utils/**
- .github/workflows/test-pr.yml

- name: Generate runtime test matrix
id: matrix
env:
TEMPLATES: ${{ steps.filter.outputs.changes }}
shell: bash
run: |
configs=$(
while IFS= read -r template; do
jq -c --arg template "${template}" '
.options | to_entries[]
| select(.key != "azureFunctionsCliVersion")
| .value.proposals[] as $runtime
| { template: $template, runtime: $runtime }
' "src/${template}/devcontainer-template.json"
done < <(jq -r '.[]' <<< "${TEMPLATES}") | jq -sc '.'
)
echo "configs=${configs}" >> "${GITHUB_OUTPUT}"

test:
needs: [detect-changes]
if: ${{ needs.detect-changes.outputs.configs != '[]' }}
runs-on: ${{ matrix.os }}
timeout-minutes: 45
strategy:
fail-fast: false
matrix:
templates: ${{ fromJSON(needs.detect-changes.outputs.templates) }}
config: ${{ fromJSON(needs.detect-changes.outputs.configs) }}
os: [ubuntu-24.04, ubuntu-24.04-arm]
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1

- name: Smoke test for '${{ matrix.templates }}'
- name: Smoke test for '${{ matrix.config.template }}' (${{ matrix.config.runtime }})
id: smoke_test
uses: ./.github/actions/smoke-test
with:
template: "${{ matrix.templates }}"
template: "${{ matrix.config.template }}"
runtime-version: "${{ matrix.config.runtime }}"
33 changes: 29 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,41 @@ A collection of [Dev Container Templates](https://containers.dev/implementors/te
| Template | Languages / Runtimes | Supported Versions |
| --- | --- | --- |
| [Azure Functions (.NET)](./src/azure-functions-dotnet) | C#, .NET | 8.0 / 9.0 / 10.0 |
| [Azure Functions (Go)](./src/azure-functions-go) | Go | 1.24 / 1.25 / 1.26 |
| [Azure Functions (Go)](./src/azure-functions-go) | Go | 1.26 / 1.27 |
| [Azure Functions (Java)](./src/azure-functions-java) | Java | 8 / 11 / 17 / 21 / 25 |
| [Azure Functions (Node.js)](./src/azure-functions-node) | JavaScript, TypeScript | 20 / 22 / 24 |
| [Azure Functions (Node.js)](./src/azure-functions-node) | JavaScript, TypeScript | 22 / 24 |
| [Azure Functions (PowerShell)](./src/azure-functions-powershell) | PowerShell | 7.4 / 7.6 |
| [Azure Functions (Python)](./src/azure-functions-python) | Python | 3.10 / 3.11 / 3.12 / 3.13 / 3.14 |
| [Azure Functions (Python)](./src/azure-functions-python) | Python | 3.11 / 3.12 / 3.13 / 3.14 |

> All templates include the Azure Functions Core Tools (version selectable, default: `latest`).
> All templates include the Azure Functions Core Tools (version selectable, default: `latest`, except Python which defaults to `4.13.0`).

All language runtimes are provided through separate `*-base` prebuilt Ubuntu 24.04 images for both AMD64 and ARM64. The templates add the selected Azure Functions Core Tools version when the development container is created.

## Runtime support and hosting plans

The default runtimes are .NET 10, Go 1.27, Java 21, Node.js 24, PowerShell 7.6, and Python 3.13. Core Tools 4.16.0 is also available as an explicit version option.

The Python template temporarily pins Core Tools to **4.13.0** on both architectures. Core Tools 4.14.0 through 4.16.0 ship incomplete Python workers on Linux ARM64 and fail during startup. See [upstream issue #5772](https://github.com/Azure/azure-functions-core-tools/issues/5772). Restore `latest` only after a fixed release passes the Python HTTP smoke tests on both architectures.

As of November 3, 2026, .NET 8, .NET 9, and PowerShell 7.4 remain available for existing projects, but their support ends on **November 10, 2026**. Plan to move to .NET 10 (isolated worker) or PowerShell 7.6 before that date. Azure Functions in-process model support also ends on November 10, 2026. Node.js 20, Python 3.10, and Go 1.24/1.25 are no longer offered for new containers because upstream support has ended. Previously published image tags remain available for existing users.

Local runtime availability does not imply support on every Azure hosting plan:

| Runtime | Azure hosting restriction |
| --- | --- |
| .NET 10 | Not supported on Linux Consumption; .NET 9 is the last supported version on that plan. |
| Java 25 | Not supported on Linux Consumption; Java 21 is the last supported version on that plan. |
| Node.js 24 | Not supported on Linux Consumption; Node.js 22 is the last supported version on that plan. |
| PowerShell 7.6 | Not supported on Linux Consumption; migrate to Flex Consumption before upgrading from 7.4. |
| Python 3.13 / 3.14 | Not supported on Linux Consumption; Python 3.12 is the last supported version on that plan. |
| Go | Generally available on Flex Consumption. |

Check the [Azure Functions language support table](https://learn.microsoft.com/azure/azure-functions/functions-versions#languages), [.NET support policy](https://dotnet.microsoft.com/platform/support/policy/dotnet-core), and [Go release policy](https://go.dev/doc/devel/release#policy) before choosing a deployment target. Core Tools 5 remains a preview and is not an explicit template option.

## Validation

Pull request CI builds each proposed runtime version for changed templates on both AMD64 and ARM64. It checks the installed tools, generates a language-specific HTTP function, starts the Functions host against the Azurite sidecar, and verifies the HTTP response. The tests use local emulated storage and do not deploy Azure resources.

## Usage

1. Open the Command Palette in VS Code and select **Dev Containers: Add Dev Container Configuration Files...**
Expand Down
7 changes: 6 additions & 1 deletion prebuild/azure-functions-powershell/.devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -1 +1,6 @@
FROM mcr.microsoft.com/devcontainers/dotnet:8.0-noble
ARG RUNTIME_VERSION

FROM mcr.microsoft.com/devcontainers/dotnet:8.0-noble AS powershell-7.4
FROM mcr.microsoft.com/devcontainers/dotnet:10.0-noble AS powershell-7.6

FROM powershell-${RUNTIME_VERSION}
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
{
"name": "Azure Functions (PowerShell) Prebuild",
"build": {
"dockerfile": "Dockerfile"
"dockerfile": "Dockerfile",
"args": {
"RUNTIME_VERSION": "${localEnv:RUNTIME_VERSION}"
}
},
"features": {
"ghcr.io/devcontainers/features/powershell:1": {
Expand Down
3 changes: 2 additions & 1 deletion src/azure-functions-dotnet/devcontainer-template.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"id": "azure-functions-dotnet",
"version": "2.0.7",
"version": "2.1.0",
"name": "Azure Functions (.NET)",
"description": "Develop C# and .NET based Azure Functions. Includes all needed SDKs, extensions, and dependencies.",
"documentationURL": "https://github.com/shibayan/devcontainers/tree/master/src/azure-functions-dotnet",
Expand All @@ -22,6 +22,7 @@
"description": "Azure Functions CLI version:",
"proposals": [
"latest",
"4.16.0",
"4.12.0",
"4.11.0",
"4.10.0",
Expand Down
2 changes: 1 addition & 1 deletion src/azure-functions-go/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Develop Go based Azure Functions. Includes all needed SDKs, extensions, and depe

| Options Id | Description | Type | Default Value |
|-----|-----|-----|-----|
| goVersion | Go version: | string | 1.24 |
| goVersion | Go version: | string | 1.27 |
| azureFunctionsCliVersion | Azure Functions CLI version: | string | latest |


Expand Down
10 changes: 5 additions & 5 deletions src/azure-functions-go/devcontainer-template.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"id": "azure-functions-go",
"version": "1.0.2",
"version": "1.1.0",
"name": "Azure Functions (Go)",
"description": "Develop Go based Azure Functions. Includes all needed SDKs, extensions, and dependencies.",
"documentationURL": "https://github.com/shibayan/devcontainers/tree/master/src/azure-functions-go",
Expand All @@ -11,17 +11,17 @@
"type": "string",
"description": "Go version:",
"proposals": [
"1.26",
"1.25",
"1.24"
"1.27",
"1.26"
],
"default": "1.24"
"default": "1.27"
},
"azureFunctionsCliVersion": {
"type": "string",
"description": "Azure Functions CLI version:",
"proposals": [
"latest",
"4.16.0",
"4.12.0"
],
"default": "latest"
Expand Down
3 changes: 2 additions & 1 deletion src/azure-functions-java/devcontainer-template.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"id": "azure-functions-java",
"version": "2.0.7",
"version": "2.1.0",
"name": "Azure Functions (Java)",
"description": "Develop Java based Azure Functions. Includes all needed SDKs, extensions, and dependencies.",
"documentationURL": "https://github.com/shibayan/devcontainers/tree/master/src/azure-functions-java",
Expand All @@ -24,6 +24,7 @@
"description": "Azure Functions CLI version:",
"proposals": [
"latest",
"4.16.0",
"4.12.0",
"4.11.0",
"4.10.0",
Expand Down
6 changes: 3 additions & 3 deletions src/azure-functions-node/devcontainer-template.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"id": "azure-functions-node",
"version": "2.0.7",
"version": "2.1.0",
"name": "Azure Functions (Node.js)",
"description": "Develop JavaScript and TypeScript based Azure Functions. Includes all needed SDKs, extensions, and dependencies.",
"documentationURL": "https://github.com/shibayan/devcontainers/tree/master/src/azure-functions-node",
Expand All @@ -12,8 +12,7 @@
"description": "Node.js version:",
"proposals": [
"24",
"22",
"20"
"22"
],
"default": "24"
},
Expand All @@ -22,6 +21,7 @@
"description": "Azure Functions CLI version:",
"proposals": [
"latest",
"4.16.0",
"4.12.0",
"4.11.0",
"4.10.0",
Expand Down
2 changes: 1 addition & 1 deletion src/azure-functions-powershell/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Develop PowerShell based Azure Functions. Includes all needed SDKs, extensions,

| Options Id | Description | Type | Default Value |
|-----|-----|-----|-----|
| powerShellVersion | PowerShell version: | string | 7.4 |
| powerShellVersion | PowerShell version: | string | 7.6 |
| azureFunctionsCliVersion | Azure Functions CLI version: | string | latest |


Expand Down
5 changes: 3 additions & 2 deletions src/azure-functions-powershell/devcontainer-template.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"id": "azure-functions-powershell",
"version": "2.0.7",
"version": "2.1.0",
"name": "Azure Functions (PowerShell)",
"description": "Develop PowerShell based Azure Functions. Includes all needed SDKs, extensions, and dependencies.",
"documentationURL": "https://github.com/shibayan/devcontainers/tree/master/src/azure-functions-powershell",
Expand All @@ -14,13 +14,14 @@
"7.6",
"7.4"
],
"default": "7.4"
"default": "7.6"
},
"azureFunctionsCliVersion": {
"type": "string",
"description": "Azure Functions CLI version:",
"proposals": [
"latest",
"4.16.0",
"4.12.0",
"4.11.0",
"4.10.0",
Expand Down
5 changes: 5 additions & 0 deletions src/azure-functions-python/NOTES.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
## Core Tools on Linux ARM64

This template defaults to Azure Functions Core Tools **4.13.0** on both architectures. Core Tools 4.14.0 through 4.16.0 ship incomplete Python workers on Linux ARM64, causing `func start` to fail with `ImportError` before functions can be indexed. Version 4.13.0 is the last known working release in that range.

Keep the default pinned until [Azure/azure-functions-core-tools#5772](https://github.com/Azure/azure-functions-core-tools/issues/5772) is resolved and the fixed release passes the Python HTTP smoke tests on both AMD64 and ARM64. Selecting `latest` or `4.16.0` currently exposes ARM64 users to this upstream defect.
8 changes: 7 additions & 1 deletion src/azure-functions-python/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,16 @@ Develop Python based Azure Functions. Includes all needed SDKs, extensions, and
| Options Id | Description | Type | Default Value |
|-----|-----|-----|-----|
| pythonVersion | Python version: | string | 3.13 |
| azureFunctionsCliVersion | Azure Functions CLI version: | string | latest |
| azureFunctionsCliVersion | Azure Functions CLI version: | string | 4.13.0 |



## Core Tools on Linux ARM64

This template defaults to Azure Functions Core Tools **4.13.0** on both architectures. Core Tools 4.14.0 through 4.16.0 ship incomplete Python workers on Linux ARM64, causing `func start` to fail with `ImportError` before functions can be indexed. Version 4.13.0 is the last known working release in that range.

Keep the default pinned until [Azure/azure-functions-core-tools#5772](https://github.com/Azure/azure-functions-core-tools/issues/5772) is resolved and the fixed release passes the Python HTTP smoke tests on both AMD64 and ARM64. Selecting `latest` or `4.16.0` currently exposes ARM64 users to this upstream defect.

---

_Note: This file was auto-generated from the [devcontainer-template.json](https://github.com/shibayan/devcontainers/blob/master/src/azure-functions-python/devcontainer-template.json). Add additional notes to a `NOTES.md`._
9 changes: 5 additions & 4 deletions src/azure-functions-python/devcontainer-template.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"id": "azure-functions-python",
"version": "2.0.7",
"version": "2.1.0",
"name": "Azure Functions (Python)",
"description": "Develop Python based Azure Functions. Includes all needed SDKs, extensions, and dependencies.",
"documentationURL": "https://github.com/shibayan/devcontainers/tree/master/src/azure-functions-python",
Expand All @@ -14,8 +14,7 @@
"3.14",
"3.13",
"3.12",
"3.11",
"3.10"
"3.11"
],
"default": "3.13"
},
Expand All @@ -24,12 +23,14 @@
"description": "Azure Functions CLI version:",
"proposals": [
"latest",
"4.16.0",
"4.13.0",
"4.12.0",
"4.11.0",
"4.10.0",
"4.9.0"
],
"default": "latest"
"default": "4.13.0"
}
},
"platforms": [
Expand Down
Loading
Loading