From ba9f637748b442057e0dcc2b9431c3553c5039fd Mon Sep 17 00:00:00 2001 From: Cristian Greco Date: Tue, 15 Apr 2025 09:26:31 +0100 Subject: [PATCH 01/22] Upgrade workflow agents from 22.04 to 24.04 --- .github/workflows/codeql-analysis.yml | 31 +++++++++---------- .github/workflows/npm-publish.yml | 2 +- .github/workflows/release-drafter.yml | 2 +- .github/workflows/test.yml | 14 ++++----- .../windows-test-command-dispatch.yml | 2 +- 5 files changed, 25 insertions(+), 26 deletions(-) diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index f2f3e70d4..52eee6c1d 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -2,17 +2,17 @@ name: "CodeQL" on: push: - branches: [ main ] + branches: [main] pull_request: # The branches below must be a subset of the branches above - branches: [ main ] + branches: [main] schedule: - - cron: '17 5 * * 2' + - cron: "17 5 * * 2" jobs: analyze: name: Analyze - runs-on: ubuntu-22.04 + runs-on: ubuntu-24.04 permissions: actions: read contents: read @@ -20,17 +20,16 @@ jobs: strategy: fail-fast: false matrix: - language: [ 'javascript' ] + language: ["javascript"] steps: - - name: Checkout repository - uses: actions/checkout@v4 - - name: Initialize CodeQL - uses: github/codeql-action/init@v3 - with: - languages: ${{ matrix.language }} - - name: Autobuild - uses: github/codeql-action/autobuild@v3 - - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v3 - + - name: Checkout repository + uses: actions/checkout@v4 + - name: Initialize CodeQL + uses: github/codeql-action/init@v3 + with: + languages: ${{ matrix.language }} + - name: Autobuild + uses: github/codeql-action/autobuild@v3 + - name: Perform CodeQL Analysis + uses: github/codeql-action/analyze@v3 diff --git a/.github/workflows/npm-publish.yml b/.github/workflows/npm-publish.yml index be25de0a8..e8eaca7bf 100644 --- a/.github/workflows/npm-publish.yml +++ b/.github/workflows/npm-publish.yml @@ -6,7 +6,7 @@ on: jobs: publish: - runs-on: ubuntu-22.04 + runs-on: ubuntu-24.04 steps: - uses: actions/checkout@v4 with: diff --git a/.github/workflows/release-drafter.yml b/.github/workflows/release-drafter.yml index 50e6b7cdb..3ce87ae46 100644 --- a/.github/workflows/release-drafter.yml +++ b/.github/workflows/release-drafter.yml @@ -10,7 +10,7 @@ on: jobs: update_release_draft: - runs-on: ubuntu-22.04 + runs-on: ubuntu-24.04 steps: # Drafts your next Release notes as Pull Requests are merged into "main" - uses: release-drafter/release-drafter@v5 diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index e5bd05e01..2d67de5f3 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -21,7 +21,7 @@ concurrency: jobs: detect-modules: name: Detect packages to check - runs-on: ubuntu-22.04 + runs-on: ubuntu-24.04 outputs: modules: ${{ steps.set-modified-modules.outputs.modules }} modules_count: ${{ steps.set-modified-modules-count.outputs.modules_count }} @@ -57,7 +57,7 @@ jobs: fail-fast: true matrix: module: ${{ fromJSON(needs.detect-modules.outputs.modules) }} - runs-on: ubuntu-22.04 + runs-on: ubuntu-24.04 steps: - name: Code checkout uses: actions/checkout@v4 @@ -65,7 +65,7 @@ jobs: id: npm-install uses: ./.github/actions/npm-setup with: - runner: ubuntu-22.04 + runner: ubuntu-24.04 node-version: 22.x workspace: "${{ matrix.module }}" - name: Code linting @@ -82,7 +82,7 @@ jobs: strategy: fail-fast: true matrix: - runner: [ubuntu-22.04] + runner: [ubuntu-24.04] node-version: [18.x, 20.x, 22.x] runs-on: ${{ matrix.runner }} steps: @@ -119,7 +119,7 @@ jobs: node-version: [18.x, 20.x, 22.x] uses: ./.github/workflows/test-template.yml with: - runner: ubuntu-22.04 + runner: ubuntu-24.04 node-version: ${{ matrix.node-version }} container-runtime: docker workspace: "${{ matrix.module }}" @@ -139,7 +139,7 @@ jobs: node-version: [18.x, 20.x, 22.x] uses: ./.github/workflows/test-template.yml with: - runner: ubuntu-22.04 + runner: ubuntu-24.04 node-version: ${{ matrix.node-version }} container-runtime: podman workspace: "${{ matrix.module }}" @@ -153,7 +153,7 @@ jobs: - smoke-test - test - test-podman - runs-on: ubuntu-22.04 + runs-on: ubuntu-24.04 steps: - name: Check if any jobs failed if: ${{ failure() || cancelled() }} diff --git a/.github/workflows/windows-test-command-dispatch.yml b/.github/workflows/windows-test-command-dispatch.yml index 89c742615..5eb5a6409 100644 --- a/.github/workflows/windows-test-command-dispatch.yml +++ b/.github/workflows/windows-test-command-dispatch.yml @@ -6,7 +6,7 @@ on: jobs: windows-test-command-dispatch: - runs-on: ubuntu-22.04 + runs-on: ubuntu-24.04 steps: - name: Dispatch windows-test command From 44b496c5b69e569b995568efca0927dcf7976fe0 Mon Sep 17 00:00:00 2001 From: Cristian Greco Date: Tue, 15 Apr 2025 09:54:21 +0100 Subject: [PATCH 02/22] Use official podman --- .github/workflows/test-template.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/test-template.yml b/.github/workflows/test-template.yml index 9e077ea0c..b125aa105 100644 --- a/.github/workflows/test-template.yml +++ b/.github/workflows/test-template.yml @@ -34,8 +34,6 @@ jobs: - name: Podman setup if: ${{ inputs.container-runtime == 'podman' }} run: | - curl -fsSL "https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/unstable/xUbuntu_$(lsb_release -rs)/Release.key" | gpg --dearmor | sudo tee /etc/apt/keyrings/devel_kubic_libcontainers_unstable.gpg > /dev/null - echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/devel_kubic_libcontainers_unstable.gpg] https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/unstable/xUbuntu_$(lsb_release -rs)/ /" | sudo tee /etc/apt/sources.list.d/devel:kubic:libcontainers:unstable.list > /dev/null sudo apt-get update sudo apt-get -y install podman systemctl enable --now --user podman podman.socket From 11c9338251bba0deb08bcc698634da28c42db8b2 Mon Sep 17 00:00:00 2001 From: Cristian Greco Date: Fri, 9 May 2025 09:12:31 +0100 Subject: [PATCH 03/22] Try rootful podman --- .github/workflows/test-template.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/test-template.yml b/.github/workflows/test-template.yml index b125aa105..fd7ff9c5c 100644 --- a/.github/workflows/test-template.yml +++ b/.github/workflows/test-template.yml @@ -36,10 +36,9 @@ jobs: run: | sudo apt-get update sudo apt-get -y install podman - systemctl enable --now --user podman podman.socket + sudo systemctl enable --now podman.socket podman info echo "DOCKER_HOST=unix://${XDG_RUNTIME_DIR}/podman/podman.sock" >> $GITHUB_ENV - echo "CI_ROOTLESS=true" >> $GITHUB_ENV echo "CI_PODMAN=true" >> $GITHUB_ENV - name: Colima constraints From 257e4e5e755cbc68072b54f3c8ab5d073573c3e4 Mon Sep 17 00:00:00 2001 From: Cristian Greco Date: Fri, 9 May 2025 09:32:51 +0100 Subject: [PATCH 04/22] Update Podman DOCKER_HOST --- .github/workflows/test-template.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test-template.yml b/.github/workflows/test-template.yml index fd7ff9c5c..1127c1f01 100644 --- a/.github/workflows/test-template.yml +++ b/.github/workflows/test-template.yml @@ -38,7 +38,7 @@ jobs: sudo apt-get -y install podman sudo systemctl enable --now podman.socket podman info - echo "DOCKER_HOST=unix://${XDG_RUNTIME_DIR}/podman/podman.sock" >> $GITHUB_ENV + echo "DOCKER_HOST=unix://$(podman info --format '{{.Host.RemoteSocket.Path}}') >> $GITHUB_ENV echo "CI_PODMAN=true" >> $GITHUB_ENV - name: Colima constraints From fe6fc59d1d77c73b4df07ddb59b2ba747639284c Mon Sep 17 00:00:00 2001 From: Cristian Greco Date: Fri, 9 May 2025 12:58:35 +0100 Subject: [PATCH 05/22] Update Podman DOCKER_HOST --- .github/workflows/test-template.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test-template.yml b/.github/workflows/test-template.yml index 1127c1f01..792e086a3 100644 --- a/.github/workflows/test-template.yml +++ b/.github/workflows/test-template.yml @@ -38,7 +38,7 @@ jobs: sudo apt-get -y install podman sudo systemctl enable --now podman.socket podman info - echo "DOCKER_HOST=unix://$(podman info --format '{{.Host.RemoteSocket.Path}}') >> $GITHUB_ENV + echo "DOCKER_HOST=unix://$(podman info --format '{{.Host.RemoteSocket.Path}}')" >> $GITHUB_ENV echo "CI_PODMAN=true" >> $GITHUB_ENV - name: Colima constraints From cb0eb78f6095469e3d690f70f09a8a0b139b9ea6 Mon Sep 17 00:00:00 2001 From: Cristian Greco Date: Fri, 9 May 2025 13:14:28 +0100 Subject: [PATCH 06/22] Remove compose fixture versions --- docker-compose.yml | 2 -- .../fixtures/docker-compose/docker-compose-malformed.yml | 2 -- .../docker-compose-with-env-file/docker-compose.yml | 2 -- .../fixtures/docker-compose/docker-compose-with-env.yml | 2 -- .../docker-compose-with-healthcheck-unhealthy.yml | 2 -- .../docker-compose-with-healthcheck-with-start-period.yml | 2 -- .../fixtures/docker-compose/docker-compose-with-healthcheck.yml | 2 -- .../docker-compose/docker-compose-with-many-services.yml | 2 -- .../fixtures/docker-compose/docker-compose-with-name.yml | 2 -- .../docker-compose-with-override/docker-compose-update.yml | 2 -- .../docker-compose-with-override/docker-compose.yml | 2 -- .../docker-compose/docker-compose-with-private-port.yml | 2 -- .../fixtures/docker-compose/docker-compose-with-profile.yml | 2 -- .../fixtures/docker-compose/docker-compose-with-volume.yml | 2 -- .../testcontainers/fixtures/docker-compose/docker-compose.yml | 2 -- 15 files changed, 30 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index 7c8c2b248..f3cafb7f6 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,5 +1,3 @@ -version: "3.7" - services: docs: image: python:3.8 diff --git a/packages/testcontainers/fixtures/docker-compose/docker-compose-malformed.yml b/packages/testcontainers/fixtures/docker-compose/docker-compose-malformed.yml index ad2188dc8..62450b158 100644 --- a/packages/testcontainers/fixtures/docker-compose/docker-compose-malformed.yml +++ b/packages/testcontainers/fixtures/docker-compose/docker-compose-malformed.yml @@ -1,5 +1,3 @@ -version: 3 - services: container: image: cristianrgreco/testcontainer:1.1.14 diff --git a/packages/testcontainers/fixtures/docker-compose/docker-compose-with-env-file/docker-compose.yml b/packages/testcontainers/fixtures/docker-compose/docker-compose-with-env-file/docker-compose.yml index 6ee1b7ab7..196a9dcc2 100644 --- a/packages/testcontainers/fixtures/docker-compose/docker-compose-with-env-file/docker-compose.yml +++ b/packages/testcontainers/fixtures/docker-compose/docker-compose-with-env-file/docker-compose.yml @@ -1,5 +1,3 @@ -version: "3.5" - services: container: image: cristianrgreco/testcontainer:1.1.14 diff --git a/packages/testcontainers/fixtures/docker-compose/docker-compose-with-env.yml b/packages/testcontainers/fixtures/docker-compose/docker-compose-with-env.yml index 6ee1b7ab7..196a9dcc2 100644 --- a/packages/testcontainers/fixtures/docker-compose/docker-compose-with-env.yml +++ b/packages/testcontainers/fixtures/docker-compose/docker-compose-with-env.yml @@ -1,5 +1,3 @@ -version: "3.5" - services: container: image: cristianrgreco/testcontainer:1.1.14 diff --git a/packages/testcontainers/fixtures/docker-compose/docker-compose-with-healthcheck-unhealthy.yml b/packages/testcontainers/fixtures/docker-compose/docker-compose-with-healthcheck-unhealthy.yml index 4e33bdbe2..40cf54923 100644 --- a/packages/testcontainers/fixtures/docker-compose/docker-compose-with-healthcheck-unhealthy.yml +++ b/packages/testcontainers/fixtures/docker-compose/docker-compose-with-healthcheck-unhealthy.yml @@ -1,5 +1,3 @@ -version: "3.5" - services: container: image: cristianrgreco/testcontainer:1.1.14 diff --git a/packages/testcontainers/fixtures/docker-compose/docker-compose-with-healthcheck-with-start-period.yml b/packages/testcontainers/fixtures/docker-compose/docker-compose-with-healthcheck-with-start-period.yml index 160da896b..2c14b6a63 100644 --- a/packages/testcontainers/fixtures/docker-compose/docker-compose-with-healthcheck-with-start-period.yml +++ b/packages/testcontainers/fixtures/docker-compose/docker-compose-with-healthcheck-with-start-period.yml @@ -1,5 +1,3 @@ -version: "3.5" - services: container: image: cristianrgreco/testcontainer:1.1.14 diff --git a/packages/testcontainers/fixtures/docker-compose/docker-compose-with-healthcheck.yml b/packages/testcontainers/fixtures/docker-compose/docker-compose-with-healthcheck.yml index 156454608..8936c1308 100644 --- a/packages/testcontainers/fixtures/docker-compose/docker-compose-with-healthcheck.yml +++ b/packages/testcontainers/fixtures/docker-compose/docker-compose-with-healthcheck.yml @@ -1,5 +1,3 @@ -version: "3.5" - services: container: image: cristianrgreco/testcontainer:1.1.14 diff --git a/packages/testcontainers/fixtures/docker-compose/docker-compose-with-many-services.yml b/packages/testcontainers/fixtures/docker-compose/docker-compose-with-many-services.yml index 8a27089d6..61abe6fc8 100644 --- a/packages/testcontainers/fixtures/docker-compose/docker-compose-with-many-services.yml +++ b/packages/testcontainers/fixtures/docker-compose/docker-compose-with-many-services.yml @@ -1,5 +1,3 @@ -version: "3.5" - services: service_1: image: cristianrgreco/testcontainer:1.1.14 diff --git a/packages/testcontainers/fixtures/docker-compose/docker-compose-with-name.yml b/packages/testcontainers/fixtures/docker-compose/docker-compose-with-name.yml index c0388aabe..045479673 100644 --- a/packages/testcontainers/fixtures/docker-compose/docker-compose-with-name.yml +++ b/packages/testcontainers/fixtures/docker-compose/docker-compose-with-name.yml @@ -1,5 +1,3 @@ -version: "3.5" - services: db: container_name: ${CONTAINER_NAME:-custom_container_name} diff --git a/packages/testcontainers/fixtures/docker-compose/docker-compose-with-override/docker-compose-update.yml b/packages/testcontainers/fixtures/docker-compose/docker-compose-with-override/docker-compose-update.yml index 3ec3280d5..dbd90d33a 100644 --- a/packages/testcontainers/fixtures/docker-compose/docker-compose-with-override/docker-compose-update.yml +++ b/packages/testcontainers/fixtures/docker-compose/docker-compose-with-override/docker-compose-update.yml @@ -1,5 +1,3 @@ -version: "3.5" - services: container: environment: diff --git a/packages/testcontainers/fixtures/docker-compose/docker-compose-with-override/docker-compose.yml b/packages/testcontainers/fixtures/docker-compose/docker-compose-with-override/docker-compose.yml index ba01cfb8e..f93fea443 100644 --- a/packages/testcontainers/fixtures/docker-compose/docker-compose-with-override/docker-compose.yml +++ b/packages/testcontainers/fixtures/docker-compose/docker-compose-with-override/docker-compose.yml @@ -1,5 +1,3 @@ -version: "3.5" - services: container: image: cristianrgreco/testcontainer:1.1.14 diff --git a/packages/testcontainers/fixtures/docker-compose/docker-compose-with-private-port.yml b/packages/testcontainers/fixtures/docker-compose/docker-compose-with-private-port.yml index b9bbb72c5..61ddcfdae 100644 --- a/packages/testcontainers/fixtures/docker-compose/docker-compose-with-private-port.yml +++ b/packages/testcontainers/fixtures/docker-compose/docker-compose-with-private-port.yml @@ -1,5 +1,3 @@ -version: "3.5" - services: container: image: cristianrgreco/testcontainer:1.1.14 diff --git a/packages/testcontainers/fixtures/docker-compose/docker-compose-with-profile.yml b/packages/testcontainers/fixtures/docker-compose/docker-compose-with-profile.yml index 0a20be447..452316fe5 100644 --- a/packages/testcontainers/fixtures/docker-compose/docker-compose-with-profile.yml +++ b/packages/testcontainers/fixtures/docker-compose/docker-compose-with-profile.yml @@ -1,5 +1,3 @@ -version: "3.9" - services: container: image: cristianrgreco/testcontainer:1.1.14 diff --git a/packages/testcontainers/fixtures/docker-compose/docker-compose-with-volume.yml b/packages/testcontainers/fixtures/docker-compose/docker-compose-with-volume.yml index 11217bc13..d79e61e15 100644 --- a/packages/testcontainers/fixtures/docker-compose/docker-compose-with-volume.yml +++ b/packages/testcontainers/fixtures/docker-compose/docker-compose-with-volume.yml @@ -1,5 +1,3 @@ -version: "3.5" - services: container: image: cristianrgreco/testcontainer:1.1.14 diff --git a/packages/testcontainers/fixtures/docker-compose/docker-compose.yml b/packages/testcontainers/fixtures/docker-compose/docker-compose.yml index 82aacb193..66c33e9d3 100644 --- a/packages/testcontainers/fixtures/docker-compose/docker-compose.yml +++ b/packages/testcontainers/fixtures/docker-compose/docker-compose.yml @@ -1,5 +1,3 @@ -version: "3.5" - services: container: image: cristianrgreco/testcontainer:1.1.14 From 231c8a8af25d884f04740f86caf27c4ed99c1121 Mon Sep 17 00:00:00 2001 From: Cristian Greco Date: Fri, 9 May 2025 13:47:37 +0100 Subject: [PATCH 07/22] Fix malformed docker-compose fixture --- .../docker-compose/docker-compose-malformed.yml | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/packages/testcontainers/fixtures/docker-compose/docker-compose-malformed.yml b/packages/testcontainers/fixtures/docker-compose/docker-compose-malformed.yml index 62450b158..1ea2cb73d 100644 --- a/packages/testcontainers/fixtures/docker-compose/docker-compose-malformed.yml +++ b/packages/testcontainers/fixtures/docker-compose/docker-compose-malformed.yml @@ -1,9 +1 @@ -services: - container: - image: cristianrgreco/testcontainer:1.1.14 - ports: - - 8080 - another-container: - image: cristianrgreco/testcontainer:1.1.14 - ports: - - 8080 +MALFORMED \ No newline at end of file From 63225a77165eae51db36bb842e5ab4d92ce68cfc Mon Sep 17 00:00:00 2001 From: Cristian Greco Date: Wed, 18 Feb 2026 15:23:06 +0000 Subject: [PATCH 08/22] Use ubuntu-24 workflows and simplify Podman setup --- .github/actions/podman-setup/action.yml | 4 ---- .github/workflows/close-inactive-issues.yml | 2 +- .github/workflows/dependency-review.yml | 2 +- 3 files changed, 2 insertions(+), 6 deletions(-) diff --git a/.github/actions/podman-setup/action.yml b/.github/actions/podman-setup/action.yml index 99b07a35d..6135baa7a 100644 --- a/.github/actions/podman-setup/action.yml +++ b/.github/actions/podman-setup/action.yml @@ -6,10 +6,6 @@ runs: - name: Podman setup shell: bash run: | - curl -fsSL "https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/unstable/xUbuntu_$(lsb_release -rs)/Release.key" | gpg --dearmor | sudo tee /etc/apt/keyrings/devel_kubic_libcontainers_unstable.gpg > /dev/null - echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/devel_kubic_libcontainers_unstable.gpg] https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/unstable/xUbuntu_$(lsb_release -rs)/ /" | sudo tee /etc/apt/sources.list.d/devel:kubic:libcontainers:unstable.list > /dev/null - sudo apt-get update - sudo apt-get -y install podman systemctl enable --now --user podman podman.socket podman info echo "DOCKER_HOST=unix://${XDG_RUNTIME_DIR}/podman/podman.sock" >> $GITHUB_ENV diff --git a/.github/workflows/close-inactive-issues.yml b/.github/workflows/close-inactive-issues.yml index 2708a4b46..06f8ab894 100644 --- a/.github/workflows/close-inactive-issues.yml +++ b/.github/workflows/close-inactive-issues.yml @@ -6,7 +6,7 @@ on: jobs: close-issues: - runs-on: ubuntu-22.04 + runs-on: ubuntu-24.04 permissions: issues: write pull-requests: write diff --git a/.github/workflows/dependency-review.yml b/.github/workflows/dependency-review.yml index 25ab4414a..86a2aac9b 100644 --- a/.github/workflows/dependency-review.yml +++ b/.github/workflows/dependency-review.yml @@ -7,7 +7,7 @@ permissions: jobs: dependency-review: name: Run - runs-on: ubuntu-22.04 + runs-on: ubuntu-24.04 steps: - name: "Checkout Repository" uses: actions/checkout@v5 From ba938984cf31b9c378de6f2d27e95a93b674df8f Mon Sep 17 00:00:00 2001 From: Cristian Greco Date: Wed, 18 Feb 2026 15:36:21 +0000 Subject: [PATCH 09/22] Force Podman runtime to runc in CI --- .github/actions/podman-setup/action.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/actions/podman-setup/action.yml b/.github/actions/podman-setup/action.yml index 6135baa7a..f28ae4535 100644 --- a/.github/actions/podman-setup/action.yml +++ b/.github/actions/podman-setup/action.yml @@ -6,6 +6,11 @@ runs: - name: Podman setup shell: bash run: | + mkdir -p ~/.config/containers + cat < ~/.config/containers/containers.conf + [engine] + runtime = "runc" + EOF systemctl enable --now --user podman podman.socket podman info echo "DOCKER_HOST=unix://${XDG_RUNTIME_DIR}/podman/podman.sock" >> $GITHUB_ENV From 2f4024b66253b5349ecd81fc79b42b4b54a5bbdf Mon Sep 17 00:00:00 2001 From: Cristian Greco Date: Wed, 18 Feb 2026 15:43:27 +0000 Subject: [PATCH 10/22] Trigger PR sync From 73af34045ceb02985b4a9c29efe60fa1fc4d4e1c Mon Sep 17 00:00:00 2001 From: Cristian Greco Date: Thu, 19 Feb 2026 09:14:29 +0000 Subject: [PATCH 11/22] Upgrade Ubuntu Podman packages in CI setup --- .github/actions/podman-setup/action.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/actions/podman-setup/action.yml b/.github/actions/podman-setup/action.yml index f28ae4535..671c29da3 100644 --- a/.github/actions/podman-setup/action.yml +++ b/.github/actions/podman-setup/action.yml @@ -6,6 +6,9 @@ runs: - name: Podman setup shell: bash run: | + sudo apt-get update + sudo apt-get install -y --only-upgrade podman golang-github-containers-common + dpkg-query -W podman golang-github-containers-common mkdir -p ~/.config/containers cat < ~/.config/containers/containers.conf [engine] From 7b9671a77ca05a156d59036603891dd0d7d74e92 Mon Sep 17 00:00:00 2001 From: Cristian Greco Date: Fri, 15 May 2026 17:18:12 +0100 Subject: [PATCH 12/22] Install podman with redhat-actions/podman-install@main --- .github/actions/podman-setup/action.yml | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/.github/actions/podman-setup/action.yml b/.github/actions/podman-setup/action.yml index 671c29da3..b00e5dbc1 100644 --- a/.github/actions/podman-setup/action.yml +++ b/.github/actions/podman-setup/action.yml @@ -3,17 +3,14 @@ description: "Sets up Podman" runs: using: "composite" steps: - - name: Podman setup + - name: Install Podman + uses: redhat-actions/podman-install@main + with: + podman-version-input: 5.6.2 + + - name: Configure Podman shell: bash run: | - sudo apt-get update - sudo apt-get install -y --only-upgrade podman golang-github-containers-common - dpkg-query -W podman golang-github-containers-common - mkdir -p ~/.config/containers - cat < ~/.config/containers/containers.conf - [engine] - runtime = "runc" - EOF systemctl enable --now --user podman podman.socket podman info echo "DOCKER_HOST=unix://${XDG_RUNTIME_DIR}/podman/podman.sock" >> $GITHUB_ENV From 245730330b7def655d62b55ed8c5c9720540d1ad Mon Sep 17 00:00:00 2001 From: Cristian Greco Date: Fri, 15 May 2026 18:30:37 +0100 Subject: [PATCH 13/22] Correct podman-version --- .github/actions/podman-setup/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/actions/podman-setup/action.yml b/.github/actions/podman-setup/action.yml index b00e5dbc1..edd415a3e 100644 --- a/.github/actions/podman-setup/action.yml +++ b/.github/actions/podman-setup/action.yml @@ -6,7 +6,7 @@ runs: - name: Install Podman uses: redhat-actions/podman-install@main with: - podman-version-input: 5.6.2 + podman-version-input: 5.4.2 - name: Configure Podman shell: bash From 0d0daa98ff8634ed78dcc1753164e1bd3b7a5b79 Mon Sep 17 00:00:00 2001 From: Cristian Greco Date: Tue, 19 May 2026 11:56:26 +0100 Subject: [PATCH 14/22] Test Podman with rootful socket on Ubuntu 24.04 --- .github/actions/podman-setup/action.yml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/actions/podman-setup/action.yml b/.github/actions/podman-setup/action.yml index edd415a3e..102070313 100644 --- a/.github/actions/podman-setup/action.yml +++ b/.github/actions/podman-setup/action.yml @@ -11,8 +11,7 @@ runs: - name: Configure Podman shell: bash run: | - systemctl enable --now --user podman podman.socket - podman info - echo "DOCKER_HOST=unix://${XDG_RUNTIME_DIR}/podman/podman.sock" >> $GITHUB_ENV - echo "CI_ROOTLESS=true" >> $GITHUB_ENV + sudo systemctl enable --now podman.socket + podman --url=unix:///run/podman/podman.sock info + echo "DOCKER_HOST=unix:///run/podman/podman.sock" >> $GITHUB_ENV echo "CI_PODMAN=true" >> $GITHUB_ENV From cc1280302bdb96dd2b865c750ea4ade15dfdb8c8 Mon Sep 17 00:00:00 2001 From: Cristian Greco Date: Tue, 19 May 2026 12:01:41 +0100 Subject: [PATCH 15/22] Allow runner to access rootful Podman socket --- .github/actions/podman-setup/action.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/actions/podman-setup/action.yml b/.github/actions/podman-setup/action.yml index 102070313..48d1fd067 100644 --- a/.github/actions/podman-setup/action.yml +++ b/.github/actions/podman-setup/action.yml @@ -12,6 +12,7 @@ runs: shell: bash run: | sudo systemctl enable --now podman.socket + sudo chgrp "$(id -gn)" /run/podman/podman.sock podman --url=unix:///run/podman/podman.sock info echo "DOCKER_HOST=unix:///run/podman/podman.sock" >> $GITHUB_ENV echo "CI_PODMAN=true" >> $GITHUB_ENV From 29342affbbd3ed14694724c34454222d8cab2636 Mon Sep 17 00:00:00 2001 From: Cristian Greco Date: Tue, 19 May 2026 12:42:29 +0100 Subject: [PATCH 16/22] Pin Podman install action to Noble packages --- .github/actions/podman-setup/action.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/actions/podman-setup/action.yml b/.github/actions/podman-setup/action.yml index 48d1fd067..f81791bb9 100644 --- a/.github/actions/podman-setup/action.yml +++ b/.github/actions/podman-setup/action.yml @@ -4,15 +4,14 @@ runs: using: "composite" steps: - name: Install Podman - uses: redhat-actions/podman-install@main + uses: redhat-actions/podman-install@5bc2ecc87c737059124c295845be51ee7297fb89 with: - podman-version-input: 5.4.2 + ubuntu-repository: noble - name: Configure Podman shell: bash run: | sudo systemctl enable --now podman.socket - sudo chgrp "$(id -gn)" /run/podman/podman.sock podman --url=unix:///run/podman/podman.sock info echo "DOCKER_HOST=unix:///run/podman/podman.sock" >> $GITHUB_ENV echo "CI_PODMAN=true" >> $GITHUB_ENV From 23d0e09f15472192700d6f5f4befcaf98bc3dffe Mon Sep 17 00:00:00 2001 From: Cristian Greco Date: Tue, 19 May 2026 12:49:25 +0100 Subject: [PATCH 17/22] Use Kubic Podman packages for Ubuntu 24.04 --- .github/actions/podman-setup/action.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/actions/podman-setup/action.yml b/.github/actions/podman-setup/action.yml index f81791bb9..c87b1dba7 100644 --- a/.github/actions/podman-setup/action.yml +++ b/.github/actions/podman-setup/action.yml @@ -6,7 +6,8 @@ runs: - name: Install Podman uses: redhat-actions/podman-install@5bc2ecc87c737059124c295845be51ee7297fb89 with: - ubuntu-repository: noble + ubuntu-repository: kubic + ubuntu-version: "24.04" - name: Configure Podman shell: bash From ab44d177f31930cdcbaa61a6099db7a41456ac75 Mon Sep 17 00:00:00 2001 From: Cristian Greco Date: Tue, 19 May 2026 13:03:39 +0100 Subject: [PATCH 18/22] Use Podman 5 with rootful socket access in CI --- .github/actions/podman-setup/action.yml | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/.github/actions/podman-setup/action.yml b/.github/actions/podman-setup/action.yml index c87b1dba7..3ccd4397a 100644 --- a/.github/actions/podman-setup/action.yml +++ b/.github/actions/podman-setup/action.yml @@ -6,13 +6,22 @@ runs: - name: Install Podman uses: redhat-actions/podman-install@5bc2ecc87c737059124c295845be51ee7297fb89 with: - ubuntu-repository: kubic - ubuntu-version: "24.04" + ubuntu-repository: questing - name: Configure Podman shell: bash run: | - sudo systemctl enable --now podman.socket + PODMAN_VERSION="$(podman --version | awk '{print $3}')" + if [[ "${PODMAN_VERSION}" != 5.* ]]; then + echo "Expected Podman 5.x, got ${PODMAN_VERSION}" + exit 1 + fi + + sudo mkdir -p /etc/systemd/system/podman.socket.d + printf '[Socket]\nSocketUser=%s\nSocketMode=0600\n' "$(id -un)" | sudo tee /etc/systemd/system/podman.socket.d/runner.conf + sudo systemctl daemon-reload + sudo systemctl enable podman.socket + sudo systemctl restart podman.socket podman --url=unix:///run/podman/podman.sock info echo "DOCKER_HOST=unix:///run/podman/podman.sock" >> $GITHUB_ENV echo "CI_PODMAN=true" >> $GITHUB_ENV From 897c540f158e3422f82f4fe1c28c7402ad8cba7e Mon Sep 17 00:00:00 2001 From: Cristian Greco Date: Tue, 19 May 2026 13:08:31 +0100 Subject: [PATCH 19/22] Derive Podman socket path in CI --- .github/actions/podman-setup/action.yml | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/.github/actions/podman-setup/action.yml b/.github/actions/podman-setup/action.yml index 3ccd4397a..d250ec2bd 100644 --- a/.github/actions/podman-setup/action.yml +++ b/.github/actions/podman-setup/action.yml @@ -17,11 +17,15 @@ runs: exit 1 fi + PODMAN_SOCKET="$(sudo podman info --format '{{.Host.RemoteSocket.Path}}')" + sudo mkdir -p /etc/systemd/system/podman.socket.d - printf '[Socket]\nSocketUser=%s\nSocketMode=0600\n' "$(id -un)" | sudo tee /etc/systemd/system/podman.socket.d/runner.conf + printf '[Socket]\nSocketUser=%s\nSocketMode=0600\nRemoveOnStop=yes\n' "$(id -un)" | sudo tee /etc/systemd/system/podman.socket.d/runner.conf sudo systemctl daemon-reload - sudo systemctl enable podman.socket - sudo systemctl restart podman.socket - podman --url=unix:///run/podman/podman.sock info - echo "DOCKER_HOST=unix:///run/podman/podman.sock" >> $GITHUB_ENV + sudo systemctl stop podman.service podman.socket || true + sudo rm -f "${PODMAN_SOCKET}" + sudo systemctl enable --now podman.socket + ls -l "${PODMAN_SOCKET}" + podman --url="unix://${PODMAN_SOCKET}" info + echo "DOCKER_HOST=unix://${PODMAN_SOCKET}" >> $GITHUB_ENV echo "CI_PODMAN=true" >> $GITHUB_ENV From 532287aa5b5ee4fbe800feac3be0b72049e3f0f7 Mon Sep 17 00:00:00 2001 From: Cristian Greco Date: Tue, 19 May 2026 13:14:11 +0100 Subject: [PATCH 20/22] Use runner temp path for Podman socket --- .github/actions/podman-setup/action.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/actions/podman-setup/action.yml b/.github/actions/podman-setup/action.yml index d250ec2bd..f0c6d30d8 100644 --- a/.github/actions/podman-setup/action.yml +++ b/.github/actions/podman-setup/action.yml @@ -17,13 +17,13 @@ runs: exit 1 fi - PODMAN_SOCKET="$(sudo podman info --format '{{.Host.RemoteSocket.Path}}')" + PODMAN_SOCKET="${RUNNER_TEMP:-/tmp}/podman.sock" sudo mkdir -p /etc/systemd/system/podman.socket.d - printf '[Socket]\nSocketUser=%s\nSocketMode=0600\nRemoveOnStop=yes\n' "$(id -un)" | sudo tee /etc/systemd/system/podman.socket.d/runner.conf - sudo systemctl daemon-reload sudo systemctl stop podman.service podman.socket || true sudo rm -f "${PODMAN_SOCKET}" + printf '[Socket]\nListenStream=\nListenStream=%s\nSocketUser=%s\nSocketMode=0600\nRemoveOnStop=yes\n' "${PODMAN_SOCKET}" "$(id -un)" | sudo tee /etc/systemd/system/podman.socket.d/runner.conf + sudo systemctl daemon-reload sudo systemctl enable --now podman.socket ls -l "${PODMAN_SOCKET}" podman --url="unix://${PODMAN_SOCKET}" info From 4ad85250759246c058af73c6b7fb3034f953118e Mon Sep 17 00:00:00 2001 From: Cristian Greco Date: Tue, 19 May 2026 13:34:49 +0100 Subject: [PATCH 21/22] Adjust Podman 5 test expectations --- .../src/generic-container/generic-container.test.ts | 2 +- .../src/wait-strategies/host-port-wait-strategy.test.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/testcontainers/src/generic-container/generic-container.test.ts b/packages/testcontainers/src/generic-container/generic-container.test.ts index a5ebf3380..2e7f999a0 100644 --- a/packages/testcontainers/src/generic-container/generic-container.test.ts +++ b/packages/testcontainers/src/generic-container/generic-container.test.ts @@ -276,7 +276,7 @@ describe("GenericContainer", { timeout: 180_000 }, () => { it("should set security options", async () => { await using container = await new GenericContainer("cristianrgreco/testcontainer:1.1.14") .withSecurityOpt("no-new-privileges") - .withExposedPorts(8080) + .withCommand(["sleep", "60"]) .start(); const { output } = await container.exec(["sh", "-c", "awk '/^NoNewPrivs:/ { print $2 }' /proc/1/status"]); diff --git a/packages/testcontainers/src/wait-strategies/host-port-wait-strategy.test.ts b/packages/testcontainers/src/wait-strategies/host-port-wait-strategy.test.ts index b74088b22..aa6e36dec 100644 --- a/packages/testcontainers/src/wait-strategies/host-port-wait-strategy.test.ts +++ b/packages/testcontainers/src/wait-strategies/host-port-wait-strategy.test.ts @@ -20,7 +20,7 @@ describe("HostPortWaitStrategy", { timeout: 180_000 }, () => { .withExposedPorts(8081) .withStartupTimeout(0) .start() - ).rejects.toThrowError(/Port \d+\/(tcp|udp) not bound after 0ms/); + ).rejects.toThrowError(/Port \d+(\/(tcp|udp))? not bound after 0ms/); expect(await getRunningContainerNames()).not.toContain(containerName); }); From 8796580f1ed2f1b6ebf534d8c7b1a3e72d336170 Mon Sep 17 00:00:00 2001 From: Cristian Greco Date: Tue, 19 May 2026 13:51:42 +0100 Subject: [PATCH 22/22] Simplify rootful Podman socket setup --- .github/actions/podman-setup/action.yml | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/.github/actions/podman-setup/action.yml b/.github/actions/podman-setup/action.yml index f0c6d30d8..7179b19ce 100644 --- a/.github/actions/podman-setup/action.yml +++ b/.github/actions/podman-setup/action.yml @@ -11,21 +11,12 @@ runs: - name: Configure Podman shell: bash run: | - PODMAN_VERSION="$(podman --version | awk '{print $3}')" - if [[ "${PODMAN_VERSION}" != 5.* ]]; then - echo "Expected Podman 5.x, got ${PODMAN_VERSION}" - exit 1 - fi - PODMAN_SOCKET="${RUNNER_TEMP:-/tmp}/podman.sock" sudo mkdir -p /etc/systemd/system/podman.socket.d - sudo systemctl stop podman.service podman.socket || true - sudo rm -f "${PODMAN_SOCKET}" - printf '[Socket]\nListenStream=\nListenStream=%s\nSocketUser=%s\nSocketMode=0600\nRemoveOnStop=yes\n' "${PODMAN_SOCKET}" "$(id -un)" | sudo tee /etc/systemd/system/podman.socket.d/runner.conf + printf '[Socket]\nListenStream=\nListenStream=%s\nSocketUser=%s\nSocketMode=0600\n' "${PODMAN_SOCKET}" "$(id -un)" | sudo tee /etc/systemd/system/podman.socket.d/runner.conf sudo systemctl daemon-reload - sudo systemctl enable --now podman.socket - ls -l "${PODMAN_SOCKET}" + sudo systemctl restart podman.socket podman --url="unix://${PODMAN_SOCKET}" info echo "DOCKER_HOST=unix://${PODMAN_SOCKET}" >> $GITHUB_ENV echo "CI_PODMAN=true" >> $GITHUB_ENV