Skip to content

Modern Docker Management, Designed for Everyone

fix: add ecr public to docker image list

Kyle Mendell0d3cd419ed7d
diff --git a/backend/internal/settings/model.go b/backend/internal/settings/model.go
index f6252c0a0..6678dbdbf 100644
--- a/backend/internal/settings/model.go
+++ b/backend/internal/settings/model.go
@@ -91,7 +91,7 @@ type Settings struct {
AutoInjectEnv SettingVariable `key:"autoInjectEnv" meta:"label=Auto Inject Env Variables;type=boolean;keywords=auto,inject,env,environment,variables,interpolation;category=internal;description=Automatically inject project .env variables into all containers (default: false)"`
DefaultDeployPullPolicy SettingVariable `key:"defaultDeployPullPolicy" meta:"label=Default Deploy Pull Policy;type=select;keywords=deploy,pull,policy,compose,up,missing,always;category=internal;description=Default image pull policy when deploying projects"`
ToolsImageRegistry SettingVariable `key:"toolsImageRegistry,envOverride" meta:"label=Tools Image Registry;type=select;keywords=tools,image,registry,ghcr,docker,hub,helper,volume;category=internal;description=Container registry used to pull the Arcane tools helper image"`
- UpdateCheckRegistry SettingVariable `key:"updateCheckRegistry,envOverride" meta:"label=Update Check Registry;type=select;keywords=update,check,registry,ghcr,docker,hub,self,image,digest;category=internal;description=Registry queried when checking whether the Arcane image has a newer digest"`
+ UpdateCheckRegistry SettingVariable `key:"updateCheckRegistry,envOverride" meta:"label=Update Check Registry;type=select;keywords=update,check,registry,ghcr,docker,hub,ecr,self,image,digest;category=internal;description=Registry queried when checking whether the Arcane image has a newer digest"`
ScheduledPruneEnabled SettingVariable `key:"scheduledPruneEnabled" meta:"label=Scheduled Prune Enabled;type=boolean;keywords=prune,cleanup,maintenance,schedule,automatic;category=internal;description=Enable scheduled pruning of unused Docker resources"`
ScheduledPruneInterval SettingVariable `key:"scheduledPruneInterval" meta:"label=Scheduled Prune Interval;type=cron;keywords=prune,cleanup,interval,minutes,schedule;category=internal;description=How often to run scheduled prunes (cron expression)"`
PruneContainerMode SettingVariable `key:"pruneContainerMode" meta:"label=Prune Containers;type=select;keywords=prune,containers,cleanup,maintenance,mode,older,stopped;category=internal;description=Select how containers should be pruned when the scheduled prune job runs"`
diff --git a/backend/internal/version/service.go b/backend/internal/version/service.go
index 636784177..f643fae3e 100644
--- a/backend/internal/version/service.go
+++ b/backend/internal/version/service.go
@@ -286,9 +286,10 @@ func (s *VersionService) updateCheckImageRefInternal(currentImageRef string) str
return currentImageRef
}
- host := libarcane.ArcaneRegistryHost(target)
+ host := libarcane.ArcaneImageRegistryHost(target)
repoPath := ref.Path(named)
- if host == libarcane.DockerHubRegistryHost {
+ // Docker Hub and ECR Public publish the images under the manager and agent names only
+ if host == libarcane.DockerHubRegistryHost || host == libarcane.ECRPublicRegistryHost {
switch repoPath {
case "getarcaneapp/arcane":
repoPath = "getarcaneapp/manager"
diff --git a/backend/pkg/libarcane/settings.go b/backend/pkg/libarcane/settings.go
index 81d38391b..d123b29ad 100644
--- a/backend/pkg/libarcane/settings.go
+++ b/backend/pkg/libarcane/settings.go
@@ -13,6 +13,7 @@ const (
GHCRRegistryHost = "ghcr.io"
DockerHubRegistryHost = "docker.io"
+ ECRPublicRegistryHost = "public.ecr.aws"
)
// ArcaneRegistryHost normalizes a registry setting to a host that mirrors the getarcaneapp images, defaulting to GHCR.
@@ -20,6 +21,14 @@ func ArcaneRegistryHost(registry string) string {
return kit.Ternary(strings.TrimSpace(registry) == DockerHubRegistryHost, DockerHubRegistryHost, GHCRRegistryHost)
}
+// ArcaneImageRegistryHost resolves the update-check registry setting; ECR Public only hosts the manager and agent images.
+func ArcaneImageRegistryHost(registry string) string {
+ if strings.TrimSpace(registry) == ECRPublicRegistryHost {
+ return ECRPublicRegistryHost
+ }
+ return ArcaneRegistryHost(registry)
+}
+
type SettingUpdate struct {
Key string `json:"key"`
Value string `json:"value"`
diff --git a/frontend/messages/en.json b/frontend/messages/en.json
index 32ed75839..872c9d530 100644
--- a/frontend/messages/en.json
+++ b/frontend/messages/en.json
@@ -1996,6 +1996,7 @@
"registries_type_label": "Registry Type",
"registries_type_generic": "Generic (Docker / OCI)",
"amazon_ecr": "Amazon ECR",
+ "registry_amazon_ecr_public": "Amazon ECR Public",
"registries_username_key_label": "Username/Key",
"registries_token_required": "Token is required",
"registries_aws_access_key_id_required": "AWS Access Key ID is required",
diff --git a/frontend/src/lib/types/settings.ts b/frontend/src/lib/types/settings.ts
index 3c4efb55d..b6b52794f 100644
--- a/frontend/src/lib/types/settings.ts
+++ b/frontend/src/lib/types/settings.ts
@@ -15,6 +15,8 @@ export type ApplicationTheme =
| 'rosepine';
export type IconCatalog = 'selfhst' | 'dashboard-icons';
+export type UpdateCheckRegistry = 'auto' | 'ghcr.io' | 'docker.io' | 'public.ecr.aws';
+
export type Settings = {
projectsDirectory: string;
templatesDirectory: string;
@@ -80,7 +82,7 @@ export type Settings = {
authSessionTimeout: number;
authPasswordPolicy: 'basic' | 'standard' | 'strong';
toolsImageRegistry: 'ghcr.io' | 'docker.io';
- updateCheckRegistry: 'auto' | 'ghcr.io' | 'docker.io';
+ updateCheckRegistry: UpdateCheckRegistry;
trivyDbRegistry: 'ghcr.io' | 'docker.io';
trivyNetwork: string;
trivySecurityOpts: string;
diff --git a/frontend/src/lib/utils/registry.ts b/frontend/src/lib/utils/registry.ts
index edb011558..78e9cda89 100644
--- a/frontend/src/lib/utils/registry.ts
+++ b/frontend/src/lib/utils/registry.ts
@@ -22,6 +22,15 @@ export function arcaneImageRegistryOptions() {
];
}
+/** Select options for the update check; ECR Public only mirrors the manager and agent images. */
+export function arcaneUpdateCheckRegistryOptions() {
+ return [
+ { value: 'auto', label: m.auto() },
+ ...arcaneImageRegistryOptions(),
+ { value: 'public.ecr.aws', label: m.registry_amazon_ecr_public() }
+ ];
+}
+
function arcaneRegistryHost(registry: string): string {
return registry === 'docker.io' ? 'docker.io' : 'ghcr.io';
}
@@ -37,7 +46,8 @@ export function arcaneTrivyDbImages(registry: string): string[] {
export function arcaneUpdateCheckImage(registry: string, isLocalEnvironment: boolean): string | null {
if (registry === 'auto') return null;
- return `${arcaneRegistryHost(registry)}/getarcaneapp/${isLocalEnvironment ? 'manager' : 'agent'}`;
+ const host = registry === 'public.ecr.aws' ? registry : arcaneRegistryHost(registry);
+ return `${host}/getarcaneapp/${isLocalEnvironment ? 'manager' : 'agent'}`;
}
/** Strips the scheme and trailing slashes so a registry URL can be used as an image host. */
diff --git a/frontend/src/routes/(app)/environments/[id]/components/DockerTab.svelte b/frontend/src/routes/(app)/environments/[id]/components/DockerTab.svelte
index 5d65af3c5..1dc3e68f4 100644
--- a/frontend/src/routes/(app)/environments/[id]/components/DockerTab.svelte
+++ b/frontend/src/routes/(app)/environments/[id]/components/DockerTab.svelte
@@ -8,7 +8,13 @@
import { m } from '#lib/paraglide/messages.js';
import { DockerBrandIcon } from '#lib/icons/index.js';
import type { DockerTabProps } from './tab-props';
- import { arcaneImageRegistryOptions, arcaneToolsImage, arcaneUpdateCheckImage } from '#lib/utils/registry.js';
+ import {
+ arcaneImageRegistryOptions,
+ arcaneToolsImage,
+ arcaneUpdateCheckImage,
+ arcaneUpdateCheckRegistryOptions
+ } from '#lib/utils/registry.js';
+ import type { UpdateCheckRegistry } from '#lib/types/settings.js';
let {
formInputs = $bindable(),
@@ -25,6 +31,7 @@
];
const registryOptions = arcaneImageRegistryOptions();
+ const updateCheckRegistryOptions = arcaneUpdateCheckRegistryOptions();
const updateCheckImage = $derived(arcaneUpdateCheckImage(formInputs.updateCheckRegistry.value, environmentId === '0'));
const pruneContainerModes = [
@@ -126,8 +133,8 @@
bind:value={formInputs.updateCheckRegistry.value}
label={m.update_check_registry_label()}
description={m.update_check_registry_description()}
- options={[{ value: 'auto', label: m.auto() }, ...registryOptions]}
- onValueChange={(v) => (formInputs.updateCheckRegistry.value = v as 'auto' | 'ghcr.io' | 'docker.io')}
+ options={updateCheckRegistryOptions}
+ onValueChange={(v) => (formInputs.updateCheckRegistry.value = v as UpdateCheckRegistry)}
/>
<p class="text-xs text-muted-foreground {updateCheckImage ? 'font-mono' : ''}">
{updateCheckImage ?? m.follows_running_image()}
diff --git a/frontend/src/routes/(app)/environments/[id]/components/environment-form-schema.ts b/frontend/src/routes/(app)/environments/[id]/components/environment-form-schema.ts
index 0b80ef4a2..4c8b58798 100644
--- a/frontend/src/routes/(app)/environments/[id]/components/environment-form-schema.ts
+++ b/frontend/src/routes/(app)/environments/[id]/components/environment-form-schema.ts
@@ -44,7 +44,7 @@ export const environmentFormSchema = environmentUpdateSchema
featureVulnerabilityManagementEnabled: z.boolean(),
vulnerabilityScanEnabled: z.boolean(),
toolsImageRegistry: z.enum(['ghcr.io', 'docker.io']),
- updateCheckRegistry: z.enum(['auto', 'ghcr.io', 'docker.io']),
+ updateCheckRegistry: z.enum(['auto', 'ghcr.io', 'docker.io', 'public.ecr.aws']),
trivyDbRegistry: z.enum(['ghcr.io', 'docker.io']),
trivyNetwork: z.string(),
trivySecurityOpts: z.string(),