diff --git a/.github/actions/smoke-test/build.sh b/.github/actions/smoke-test/build.sh index 5f9d8b2..3ae037d 100755 --- a/.github/actions/smoke-test/build.sh +++ b/.github/actions/smoke-test/build.sh @@ -16,7 +16,7 @@ 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") - PREBUILD_IMAGE="ghcr.io/shibayan/devcontainers/${TEMPLATE_ID}:${RUNTIME_VERSION}-noble" + PREBUILD_IMAGE="ghcr.io/shibayan/devcontainers/${TEMPLATE_ID}-base:${RUNTIME_VERSION}-noble" if [ -z "${RUNTIME_OPTION}" ] || [ -z "${RUNTIME_VERSION}" ] || [ "${RUNTIME_VERSION}" = "null" ] ; then echo "Unable to determine the runtime version for '${TEMPLATE_ID}'" diff --git a/.github/workflows/prebuild.yml b/.github/workflows/prebuild.yml index b94a558..4019d1a 100644 --- a/.github/workflows/prebuild.yml +++ b/.github/workflows/prebuild.yml @@ -59,7 +59,7 @@ jobs: - ubuntu-24.04-arm env: RUNTIME_VERSION: ${{ matrix.config.runtime }} - IMAGE_NAME: ghcr.io/${{ github.repository_owner }}/devcontainers/${{ matrix.config.template }} + IMAGE_NAME: ghcr.io/${{ github.repository_owner }}/devcontainers/${{ matrix.config.template }}-base steps: - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 @@ -103,7 +103,7 @@ jobs: matrix: config: ${{ fromJSON(needs.prepare.outputs.configs) }} env: - IMAGE_NAME: ghcr.io/${{ github.repository_owner }}/devcontainers/${{ matrix.config.template }} + IMAGE_NAME: ghcr.io/${{ github.repository_owner }}/devcontainers/${{ matrix.config.template }}-base RUNTIME_VERSION: ${{ matrix.config.runtime }} steps: - name: Log in to GitHub Container Registry @@ -133,3 +133,31 @@ jobs: any(.manifests[]; .platform.os == "linux" and .platform.architecture == $architecture) ' <<< "${manifest}" > /dev/null done + + verify-public: + needs: + - prepare + - merge + runs-on: ubuntu-24.04 + env: + CONFIGS: ${{ needs.prepare.outputs.configs }} + steps: + - name: Verify anonymous image access + shell: bash + run: | + failed=false + while IFS= read -r config; do + template=$(jq -r '.template' <<< "${config}") + runtime=$(jq -r '.runtime' <<< "${config}") + image="ghcr.io/${GITHUB_REPOSITORY_OWNER}/devcontainers/${template}-base:${runtime}-noble" + + echo "Verifying anonymous access to ${image}" + if ! docker buildx imagetools inspect "${image}" > /dev/null; then + echo "::error::Package '${template}-base' must be made public in GitHub Packages." + failed=true + fi + done < <(jq -c '.[]' <<< "${CONFIGS}") + + if [ "${failed}" = true ]; then + exit 1 + fi diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 986813a..8db238f 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -21,7 +21,7 @@ jobs: runtime_option=$(jq -r '.options | keys[] | select(. != "azureFunctionsCliVersion")' "${manifest_path}") while IFS= read -r runtime_version; do - image="ghcr.io/${GITHUB_REPOSITORY_OWNER}/devcontainers/${template}:${runtime_version}-noble" + image="ghcr.io/${GITHUB_REPOSITORY_OWNER}/devcontainers/${template}-base:${runtime_version}-noble" echo "Verifying ${image}" manifest=$(docker buildx imagetools inspect --raw "${image}") diff --git a/README.md b/README.md index 08207ba..a96334e 100644 --- a/README.md +++ b/README.md @@ -15,7 +15,7 @@ A collection of [Dev Container Templates](https://containers.dev/implementors/te > All templates include the Azure Functions Core Tools (version selectable, default: `latest`). -All language runtimes are provided through 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. +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. ## Usage diff --git a/prebuild/README.md b/prebuild/README.md new file mode 100644 index 0000000..98f5190 --- /dev/null +++ b/prebuild/README.md @@ -0,0 +1,9 @@ +# Prebuilt Runtime Images + +This directory contains the Dev Container definitions used to build the Ubuntu 24.04 runtime images referenced by the templates in `src`. + +Each language is published to a separate GHCR package whose name ends in `-base`. Images are published for AMD64 and ARM64 with rolling, dated, and revision tags. + +GitHub Container Registry creates new packages as private. After the first successful image push for a language, change the corresponding `*-base` package visibility to public and rerun the workflow. The final workflow job verifies that every image can be pulled anonymously. + +Previously published runtime tags without the `-base` package suffix must remain available because template versions published before this separation reference those tags. diff --git a/src/azure-functions-dotnet/.devcontainer/Dockerfile b/src/azure-functions-dotnet/.devcontainer/Dockerfile index 882b58b..4750623 100644 --- a/src/azure-functions-dotnet/.devcontainer/Dockerfile +++ b/src/azure-functions-dotnet/.devcontainer/Dockerfile @@ -1 +1 @@ -FROM ghcr.io/shibayan/devcontainers/azure-functions-dotnet:${templateOption:dotnetVersion}-noble +FROM ghcr.io/shibayan/devcontainers/azure-functions-dotnet-base:${templateOption:dotnetVersion}-noble diff --git a/src/azure-functions-dotnet/devcontainer-template.json b/src/azure-functions-dotnet/devcontainer-template.json index 8db1a72..a40598d 100644 --- a/src/azure-functions-dotnet/devcontainer-template.json +++ b/src/azure-functions-dotnet/devcontainer-template.json @@ -1,6 +1,6 @@ { "id": "azure-functions-dotnet", - "version": "2.0.6", + "version": "2.0.7", "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", diff --git a/src/azure-functions-go/.devcontainer/Dockerfile b/src/azure-functions-go/.devcontainer/Dockerfile index adeb898..18f5dcc 100644 --- a/src/azure-functions-go/.devcontainer/Dockerfile +++ b/src/azure-functions-go/.devcontainer/Dockerfile @@ -1 +1 @@ -FROM ghcr.io/shibayan/devcontainers/azure-functions-go:${templateOption:goVersion}-noble +FROM ghcr.io/shibayan/devcontainers/azure-functions-go-base:${templateOption:goVersion}-noble diff --git a/src/azure-functions-go/devcontainer-template.json b/src/azure-functions-go/devcontainer-template.json index 57180d4..34e2e77 100644 --- a/src/azure-functions-go/devcontainer-template.json +++ b/src/azure-functions-go/devcontainer-template.json @@ -1,6 +1,6 @@ { "id": "azure-functions-go", - "version": "1.0.1", + "version": "1.0.2", "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", diff --git a/src/azure-functions-java/.devcontainer/Dockerfile b/src/azure-functions-java/.devcontainer/Dockerfile index 06cb0e8..d99d475 100644 --- a/src/azure-functions-java/.devcontainer/Dockerfile +++ b/src/azure-functions-java/.devcontainer/Dockerfile @@ -1 +1 @@ -FROM ghcr.io/shibayan/devcontainers/azure-functions-java:${templateOption:javaVersion}-noble +FROM ghcr.io/shibayan/devcontainers/azure-functions-java-base:${templateOption:javaVersion}-noble diff --git a/src/azure-functions-java/devcontainer-template.json b/src/azure-functions-java/devcontainer-template.json index 3be0033..24ecb9f 100644 --- a/src/azure-functions-java/devcontainer-template.json +++ b/src/azure-functions-java/devcontainer-template.json @@ -1,6 +1,6 @@ { "id": "azure-functions-java", - "version": "2.0.6", + "version": "2.0.7", "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", diff --git a/src/azure-functions-node/.devcontainer/Dockerfile b/src/azure-functions-node/.devcontainer/Dockerfile index 585c3be..3bb7c51 100644 --- a/src/azure-functions-node/.devcontainer/Dockerfile +++ b/src/azure-functions-node/.devcontainer/Dockerfile @@ -1 +1 @@ -FROM ghcr.io/shibayan/devcontainers/azure-functions-node:${templateOption:nodeVersion}-noble +FROM ghcr.io/shibayan/devcontainers/azure-functions-node-base:${templateOption:nodeVersion}-noble diff --git a/src/azure-functions-node/devcontainer-template.json b/src/azure-functions-node/devcontainer-template.json index 201b203..0ca6c02 100644 --- a/src/azure-functions-node/devcontainer-template.json +++ b/src/azure-functions-node/devcontainer-template.json @@ -1,6 +1,6 @@ { "id": "azure-functions-node", - "version": "2.0.6", + "version": "2.0.7", "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", diff --git a/src/azure-functions-powershell/.devcontainer/Dockerfile b/src/azure-functions-powershell/.devcontainer/Dockerfile index 64be913..fd7ba68 100644 --- a/src/azure-functions-powershell/.devcontainer/Dockerfile +++ b/src/azure-functions-powershell/.devcontainer/Dockerfile @@ -1 +1 @@ -FROM ghcr.io/shibayan/devcontainers/azure-functions-powershell:${templateOption:powerShellVersion}-noble +FROM ghcr.io/shibayan/devcontainers/azure-functions-powershell-base:${templateOption:powerShellVersion}-noble diff --git a/src/azure-functions-powershell/devcontainer-template.json b/src/azure-functions-powershell/devcontainer-template.json index fcbcf61..c97239d 100644 --- a/src/azure-functions-powershell/devcontainer-template.json +++ b/src/azure-functions-powershell/devcontainer-template.json @@ -1,6 +1,6 @@ { "id": "azure-functions-powershell", - "version": "2.0.6", + "version": "2.0.7", "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", diff --git a/src/azure-functions-python/.devcontainer/Dockerfile b/src/azure-functions-python/.devcontainer/Dockerfile index 2fb84d4..7e49772 100644 --- a/src/azure-functions-python/.devcontainer/Dockerfile +++ b/src/azure-functions-python/.devcontainer/Dockerfile @@ -1 +1 @@ -FROM ghcr.io/shibayan/devcontainers/azure-functions-python:${templateOption:pythonVersion}-noble +FROM ghcr.io/shibayan/devcontainers/azure-functions-python-base:${templateOption:pythonVersion}-noble diff --git a/src/azure-functions-python/devcontainer-template.json b/src/azure-functions-python/devcontainer-template.json index 07a1bf7..802c004 100644 --- a/src/azure-functions-python/devcontainer-template.json +++ b/src/azure-functions-python/devcontainer-template.json @@ -1,6 +1,6 @@ { "id": "azure-functions-python", - "version": "2.0.6", + "version": "2.0.7", "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",