Merge pull request #8268 from dokku/5324-login-to-registry-per-app

Add the ability to log into a registry on a per-app basis
This commit is contained in:
Jose Diaz-Gonzalez
2026-01-10 08:48:16 -05:00
committed by GitHub
25 changed files with 419 additions and 34 deletions

View File

@@ -12,6 +12,7 @@ require (
github.com/dokku/dokku/plugins/docker-options v0.0.0-20250618161309-8d0c35f1333c
github.com/dokku/dokku/plugins/logs v0.0.0-20250618161309-8d0c35f1333c
github.com/dokku/dokku/plugins/nginx-vhosts v0.0.0-20250618161309-8d0c35f1333c
github.com/dokku/dokku/plugins/registry v0.0.0-20250618161309-8d0c35f1333c
github.com/fatih/color v1.18.0
github.com/fluxcd/pkg/kustomize v1.24.0
github.com/go-openapi/jsonpointer v0.22.4
@@ -190,6 +191,8 @@ replace github.com/dokku/dokku/plugins/logs => ../logs
replace github.com/dokku/dokku/plugins/nginx-vhosts => ../nginx-vhosts
replace github.com/dokku/dokku/plugins/registry => ../registry
replace github.com/joho/godotenv => github.com/joho/godotenv v1.2.0
replace github.com/imdario/mergo => github.com/imdario/mergo v0.3.16

View File

@@ -23,6 +23,7 @@ import (
"github.com/dokku/dokku/plugins/config"
"github.com/dokku/dokku/plugins/cron"
nginxvhosts "github.com/dokku/dokku/plugins/nginx-vhosts"
"github.com/dokku/dokku/plugins/registry"
"github.com/fatih/color"
"github.com/gosimple/slug"
"github.com/kballard/go-shellquote"
@@ -405,7 +406,7 @@ func TriggerSchedulerDeploy(scheduler string, appName string, imageTag string) e
pullSecretBase64 := base64.StdEncoding.EncodeToString([]byte(""))
imagePullSecrets := getComputedImagePullSecrets(appName)
if imagePullSecrets == "" {
dockerConfigPath := filepath.Join(os.Getenv("DOKKU_ROOT"), ".docker/config.json")
dockerConfigPath := filepath.Join(registry.GetComputedAppRegistryConfigDir(appName), "config.json")
if fi, err := os.Stat(dockerConfigPath); err == nil && !fi.IsDir() {
b, err := os.ReadFile(dockerConfigPath)
if err != nil {