Modern Docker Management, Designed for Everyone
Go composecontainer-managementcontainersdockerdocker-composedocker-managementgoself-hostedsveltekittypescriptweb-ui
refactor: update library used for image referencing (#1007)
Kyle Mendell4516970a44eb
diff --git a/.github/workflows/build-next-images.yml b/.github/workflows/build-next-images.ymlindex 1a7784a46..c44240174 100644--- a/.github/workflows/build-next-images.yml+++ b/.github/workflows/build-next-images.yml@@ -10,16 +10,17 @@ concurrency:group: build-next-imagescancel-in-progress: true+permissions:+ contents: write+ packages: write+ attestations: write+ id-token: write+jobs:build-images:name: Build Next Image (${{ matrix.display }})runs-on: depot-ubuntu-24.04-16timeout-minutes: 45- permissions:- contents: read- packages: write- id-token: write- attestations: writestrategy:fail-fast: falsematrix:@@ -113,9 +114,140 @@ jobs:path: sbom-output/${{ matrix.target }}name: SBOM-${{ matrix.target }}+ - name: Upload binaries artifact+ if: matrix.target == 'manager'+ uses: actions/upload-artifact@v5+ with:+ path: backend/.bin/*+ name: binaries-${{ matrix.target }}++ - name: Upload binaries artifact+ if: matrix.target == 'agent'+ uses: actions/upload-artifact@v5+ with:+ path: backend/.bin/*+ name: binaries-${{ matrix.target }}+- name: Attest build provenanceuses: actions/attest-build-provenance@v3with:subject-name: "${{ steps.image-name.outputs.value }}"subject-digest: ${{ steps.build-push-image.outputs.digest }}push-to-registry: true++ release-next:+ name: Release Next (Pre-release)+ runs-on: depot-ubuntu-24.04-16+ needs: build-images+ timeout-minutes: 15+ steps:+ - name: Checkout code+ uses: actions/checkout@v6+ with:+ fetch-depth: 1++ - name: Derive short SHA+ id: short-sha+ run: echo "value=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT++ - name: Download manager binaries+ uses: actions/download-artifact@v6+ with:+ name: binaries-manager+ path: binaries/manager++ - name: Download agent binaries+ uses: actions/download-artifact@v6+ with:+ name: binaries-agent+ path: binaries/agent++ - name: Download manager SBOM+ uses: actions/download-artifact@v6+ with:+ name: SBOM-manager+ path: sbom/manager++ - name: Download agent SBOM+ uses: actions/download-artifact@v6+ with:+ name: SBOM-agent+ path: sbom/agent++ - name: Prepare release binaries+ run: |+ mkdir -p release-binaries+ cp binaries/manager/* release-binaries/ 2>/dev/null || true+ cp binaries/agent/* release-binaries/ 2>/dev/null || true+ ls -la release-binaries/++ - name: Prepare SBOM artifacts+ run: |+ mkdir -p release-sbom+ # Package SBOMs as zip files for cleaner release assets+ cd sbom/manager && zip -r ../../release-sbom/sbom-arcane.zip . && cd ../..+ cd sbom/agent && zip -r ../../release-sbom/sbom-arcane-headless.zip . && cd ../..+ ls -la release-sbom/++ - name: Binary attestation+ uses: actions/attest-build-provenance@v3+ with:+ subject-path: "release-binaries/*"++ - name: Generate release notes+ run: |+ COMMIT_SHA="${{ github.sha }}"+ SHORT_SHA="${{ steps.short-sha.outputs.value }}"+ COMMIT_MSG=$(git log -1 --pretty=%B)+ COMMIT_AUTHOR=$(git log -1 --pretty=%an)+ COMMIT_DATE=$(git log -1 --pretty=%ci)+ REPO_OWNER=$(echo "${{ github.repository_owner }}" | tr '[:upper:]' '[:lower:]')++ cat << EOF > release-notes.md+ This pre-release is automatically built and generated on every commit to main.++ > [!WARNING]+ > This is a nightly build, not a tagged release. We recommend using tagged releases.+ > You can find tagged releases on the [releases page](https://github.com/${{ github.repository }}/releases/latest).++ ---++ ### Build Information++ | Property | Value |+ |----------|-------|+ | **Commit** | [\`${SHORT_SHA}\`](https://github.com/${{ github.repository }}/commit/${COMMIT_SHA}) |+ | **Author** | ${COMMIT_AUTHOR} |+ | **Date** | ${COMMIT_DATE} |+ | **Branch** | \`main\` |++ ### Container Images++ \`\`\`bash+ # Manager+ docker pull ghcr.io/${REPO_OWNER}/arcane:next++ # Agent+ docker pull ghcr.io/${REPO_OWNER}/arcane-headless:next+ \`\`\`++ ### Latest Commit++ \`\`\`+ ${COMMIT_MSG}+ \`\`\`+ EOF++ - name: Create pre-release+ uses: softprops/action-gh-release@v2+ with:+ tag_name: next+ name: Next (Pre-release)+ body_path: release-notes.md+ prerelease: true+ make_latest: false+ target_commitish: main+ overwrite_files: true+ files: |+ release-binaries/*+ release-sbom/*diff --git a/backend/go.mod b/backend/go.modindex 03628b698..b167f746c 100644--- a/backend/go.mod+++ b/backend/go.mod@@ -6,7 +6,6 @@ require (github.com/cenkalti/backoff/v5 v5.0.3github.com/compose-spec/compose-go/v2 v2.9.1github.com/coreos/go-oidc/v3 v3.17.0- github.com/distribution/reference v0.6.0github.com/docker/cli v28.5.2+incompatiblegithub.com/docker/compose/v2 v2.40.3github.com/docker/distribution v2.8.3+incompatible@@ -33,6 +32,7 @@ require (github.com/shirou/gopsutil/v4 v4.25.10github.com/spf13/cobra v1.10.1github.com/stretchr/testify v1.11.1+ go.podman.io/image/v5 v5.38.0golang.org/x/crypto v0.45.0golang.org/x/oauth2 v0.33.0golang.org/x/sync v0.18.0@@ -79,9 +79,10 @@ require (github.com/containerd/ttrpc v1.2.7 // indirectgithub.com/containerd/typeurl/v2 v2.2.3 // indirectgithub.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect+ github.com/distribution/reference v0.6.0 // indirectgithub.com/docker/buildx v0.29.1 // indirectgithub.com/docker/cli-docs-tool v0.10.0 // indirect- github.com/docker/docker-credential-helpers v0.9.3 // indirect+ github.com/docker/docker-credential-helpers v0.9.4 // indirectgithub.com/docker/go v1.5.1-1.0.20160303222718-d30aec9fd63c // indirectgithub.com/docker/go-metrics v0.0.1 // indirectgithub.com/docker/go-units v0.5.0 // indirect@@ -230,6 +231,7 @@ require (go.opentelemetry.io/otel/sdk/metric v1.38.0 // indirectgo.opentelemetry.io/otel/trace v1.38.0 // indirectgo.opentelemetry.io/proto/otlp v1.8.0 // indirect+ go.podman.io/storage v1.61.0 // indirectgo.uber.org/mock v0.6.0 // indirectgo.yaml.in/yaml/v2 v2.4.3 // indirectgo.yaml.in/yaml/v3 v3.0.4 // indirectdiff --git a/backend/go.sum b/backend/go.sumindex c3ed2c1c9..51a8668cf 100644--- a/backend/go.sum+++ b/backend/go.sum@@ -2,8 +2,9 @@ github.com/AdaLogics/go-fuzz-headers v0.0.0-20240806141605-e8a1dd7889d6 h1:He8afgithub.com/AdaLogics/go-fuzz-headers v0.0.0-20240806141605-e8a1dd7889d6/go.mod h1:8o94RPi1/7XTJvwPpRSzSUedZrtlirdB3r9Z20bi2f8=github.com/Azure/go-ansiterm v0.0.0-20250102033503-faa5f7b0171c h1:udKWzYgxTojEKWjV8V+WSxDXJ4NFATAsZjh8iIbsQIg=github.com/Azure/go-ansiterm v0.0.0-20250102033503-faa5f7b0171c/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E=-github.com/BurntSushi/toml v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ=github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=+github.com/BurntSushi/toml v1.5.0 h1:W5quZX/G/csjUnuI8SUYlsHs9M38FC7znL0lIO+DvMg=+github.com/BurntSushi/toml v1.5.0/go.mod h1:ukJfTF/6rtPPRCnwkur4qwRxa8vTRFBF0uk2lLoLwho=github.com/DefangLabs/secret-detector v0.0.0-20250811234530-d4b4214cd679 h1:qNT7R4qrN+5u5ajSbqSW1opHP4LA8lzA+ASyw5MQZjs=github.com/DefangLabs/secret-detector v0.0.0-20250811234530-d4b4214cd679/go.mod h1:blbwPQh4DTlCZEfk1BLU4oMIhLda2U+A840Uag9DsZw=github.com/Masterminds/semver/v3 v3.4.0 h1:Zog+i5UMtVoCU8oKka5P7i9q9HgrJeGzI9SA1Xbatp0=@@ -109,8 +110,8 @@ github.com/containerd/platforms v1.0.0-rc.1/go.mod h1:J71L7B+aiM5SdIEqmd9wp6THLVgithub.com/containerd/plugin v1.0.0 h1:c8Kf1TNl6+e2TtMHZt+39yAPDbouRH9WAToRjex483Y=github.com/containerd/plugin v1.0.0/go.mod h1:hQfJe5nmWfImiqT1q8Si3jLv3ynMUIBB47bQ+KexvO8=github.com/containerd/stargz-snapshotter v0.16.3 h1:zbQMm8dRuPHEOD4OqAYGajJJUwCeUzt4j7w9Iaw58u4=-github.com/containerd/stargz-snapshotter/estargz v0.16.3 h1:7evrXtoh1mSbGj/pfRccTampEyKpjpOnS3CyiV1Ebr8=-github.com/containerd/stargz-snapshotter/estargz v0.16.3/go.mod h1:uyr4BfYfOj3G9WBVE8cOlQmXAbPN9VEQpBBeJIuOipU=+github.com/containerd/stargz-snapshotter/estargz v0.17.0 h1:+TyQIsR/zSFI1Rm31EQBwpAA1ovYgIKHy7kctL3sLcE=+github.com/containerd/stargz-snapshotter/estargz v0.17.0/go.mod h1:s06tWAiJcXQo9/8AReBCIo/QxcXFZ2n4qfsRnpl71SM=github.com/containerd/ttrpc v1.2.7 h1:qIrroQvuOL9HQ1X6KHe2ohc7p+HP/0VE6XPU7elJRqQ=github.com/containerd/ttrpc v1.2.7/go.mod h1:YCXHsb32f+Sq5/72xHubdiJRQY9inL4a4ZQrAbN1q9o=github.com/containerd/typeurl/v2 v2.2.3 h1:yNA/94zxWdvYACdYO8zofhrTVuQY73fFU1y++dYSw40=@@ -145,8 +146,8 @@ github.com/docker/distribution v2.8.3+incompatible h1:AtKxIZ36LoNK51+Z6RpzLpddBigithub.com/docker/distribution v2.8.3+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w=github.com/docker/docker v28.5.2+incompatible h1:DBX0Y0zAjZbSrm1uzOkdr1onVghKaftjlSWt4AFexzM=github.com/docker/docker v28.5.2+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk=-github.com/docker/docker-credential-helpers v0.9.3 h1:gAm/VtF9wgqJMoxzT3Gj5p4AqIjCBS4wrsOh9yRqcz8=-github.com/docker/docker-credential-helpers v0.9.3/go.mod h1:x+4Gbw9aGmChi3qTLZj8Dfn0TD20M/fuWy0E5+WDeCo=+github.com/docker/docker-credential-helpers v0.9.4 h1:76ItO69/AP/V4yT9V4uuuItG0B1N8hvt0T0c0NN/DzI=+github.com/docker/docker-credential-helpers v0.9.4/go.mod h1:v1S+hepowrQXITkEfw6o4+BMbGot02wiKpzWhGUZK6c=github.com/docker/go v1.5.1-1.0.20160303222718-d30aec9fd63c h1:lzqkGL9b3znc+ZUgi7FlLnqjQhcXxkNM/quxIjBVMD0=github.com/docker/go v1.5.1-1.0.20160303222718-d30aec9fd63c/go.mod h1:CADgU4DSXK5QUlFslkQu2yW2TKzFZcXq/leZfM0UH5Q=github.com/docker/go-connections v0.4.0/go.mod h1:Gbd7IOopHjR8Iph03tsViu4nIes5XhDvyHbTtUxmeec=@@ -639,6 +640,10 @@ go.opentelemetry.io/otel/trace v1.38.0 h1:Fxk5bKrDZJUH+AMyyIXGcFAPah0oRcT+LuNtJrgo.opentelemetry.io/otel/trace v1.38.0/go.mod h1:j1P9ivuFsTceSWe1oY+EeW3sc+Pp42sO++GHkg4wwhs=go.opentelemetry.io/proto/otlp v1.8.0 h1:fRAZQDcAFHySxpJ1TwlA1cJ4tvcrw7nXl9xWWC8N5CE=go.opentelemetry.io/proto/otlp v1.8.0/go.mod h1:tIeYOeNBU4cvmPqpaji1P+KbB4Oloai8wN4rWzRrFF0=+go.podman.io/image/v5 v5.38.0 h1:aUKrCANkPvze1bnhLJsaubcfz0d9v/bSDLnwsXJm6G4=+go.podman.io/image/v5 v5.38.0/go.mod h1:hSIoIUzgBnmc4DjoIdzk63aloqVbD7QXDMkSE/cvG90=+go.podman.io/storage v1.61.0 h1:5hD/oyRYt1f1gxgvect+8syZBQhGhV28dCw2+CZpx0Q=+go.podman.io/storage v1.61.0/go.mod h1:A3UBK0XypjNZ6pghRhuxg62+2NIm5lcUGv/7XyMhMUI=go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto=go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE=go.uber.org/mock v0.6.0 h1:hyF9dfmbgIX5EfOdasqLsWD6xqpNZlXblLB/Dbnwv3Y=diff --git a/backend/internal/services/container_registry_service.go b/backend/internal/services/container_registry_service.goindex 8d592b5d4..da017c41c 100644--- a/backend/internal/services/container_registry_service.go+++ b/backend/internal/services/container_registry_service.go@@ -11,7 +11,6 @@ import ("sync""time"- ref "github.com/distribution/reference""github.com/getarcaneapp/arcane/backend/internal/database""github.com/getarcaneapp/arcane/backend/internal/dto""github.com/getarcaneapp/arcane/backend/internal/models"@@ -19,6 +18,7 @@ import ("github.com/getarcaneapp/arcane/backend/internal/utils/cache""github.com/getarcaneapp/arcane/backend/internal/utils/pagination""github.com/getarcaneapp/arcane/backend/internal/utils/registry"+ ref "go.podman.io/image/v5/docker/reference")const (diff --git a/backend/internal/services/image_service.go b/backend/internal/services/image_service.goindex fd32b33e7..69e80bbd5 100644--- a/backend/internal/services/image_service.go+++ b/backend/internal/services/image_service.go@@ -13,7 +13,6 @@ import ("log/slog"- ref "github.com/distribution/reference""github.com/docker/docker/api/types/container""github.com/docker/docker/api/types/filters""github.com/docker/docker/api/types/image"@@ -22,6 +21,7 @@ import ("github.com/getarcaneapp/arcane/backend/internal/dto""github.com/getarcaneapp/arcane/backend/internal/models""github.com/getarcaneapp/arcane/backend/internal/utils/pagination"+ ref "go.podman.io/image/v5/docker/reference""golang.org/x/sync/errgroup""gorm.io/gorm")diff --git a/backend/internal/services/image_update_service.go b/backend/internal/services/image_update_service.goindex c83dc156f..dcf889ea6 100644--- a/backend/internal/services/image_update_service.go+++ b/backend/internal/services/image_update_service.go@@ -8,13 +8,13 @@ import ("sync""time"- ref "github.com/distribution/reference""github.com/docker/docker/api/types/image""github.com/getarcaneapp/arcane/backend/internal/database""github.com/getarcaneapp/arcane/backend/internal/dto""github.com/getarcaneapp/arcane/backend/internal/models""github.com/getarcaneapp/arcane/backend/internal/utils"registry "github.com/getarcaneapp/arcane/backend/internal/utils/registry"+ ref "go.podman.io/image/v5/docker/reference""golang.org/x/sync/errgroup""gorm.io/gorm")diff --git a/backend/internal/services/image_update_service_test.go b/backend/internal/services/image_update_service_test.goindex 244f0c8d4..6a8de2ddf 100644--- a/backend/internal/services/image_update_service_test.go+++ b/backend/internal/services/image_update_service_test.go@@ -3,9 +3,9 @@ package servicesimport ("testing"- ref "github.com/distribution/reference""github.com/stretchr/testify/assert""github.com/stretchr/testify/require"+ ref "go.podman.io/image/v5/docker/reference")// TestParseImageReference tests the parseImageReference function with various image formatsdiff --git a/backend/internal/services/version_service.go b/backend/internal/services/version_service.goindex cd4589f21..d0f2235b2 100644--- a/backend/internal/services/version_service.go+++ b/backend/internal/services/version_service.go@@ -11,9 +11,9 @@ import ("strings""time"- ref "github.com/distribution/reference""github.com/getarcaneapp/arcane/backend/internal/dto""github.com/getarcaneapp/arcane/backend/internal/utils/cache"+ ref "go.podman.io/image/v5/docker/reference")const (diff --git a/backend/internal/utils/registry/auth.go b/backend/internal/utils/registry/auth.goindex 4e7d044ab..ae30321f3 100644--- a/backend/internal/utils/registry/auth.go+++ b/backend/internal/utils/registry/auth.go@@ -10,7 +10,7 @@ import ("strings""time"- ref "github.com/distribution/reference"+ ref "go.podman.io/image/v5/docker/reference""github.com/getarcaneapp/arcane/backend/internal/models""github.com/getarcaneapp/arcane/backend/internal/utils"diff --git a/backend/internal/utils/registry/helpers.go b/backend/internal/utils/registry/helpers.goindex f90f74308..5addd499c 100644--- a/backend/internal/utils/registry/helpers.go+++ b/backend/internal/utils/registry/helpers.go@@ -1,6 +1,6 @@package registry-import ref "github.com/distribution/reference"+import ref "go.podman.io/image/v5/docker/reference"func GetRegistryAddress(imageRef string) (string, error) {named, err := ref.ParseNormalizedNamed(imageRef)