mirror of
https://github.com/mudler/luet.git
synced 2025-09-13 05:42:52 +00:00
Strip invalid chars from docker images also for metadata files
Fixes #199
This commit is contained in:
@@ -19,6 +19,7 @@ import (
|
||||
"context"
|
||||
"encoding/hex"
|
||||
"os"
|
||||
"strings"
|
||||
|
||||
"github.com/docker/cli/cli/trust"
|
||||
"github.com/docker/distribution/reference"
|
||||
@@ -122,3 +123,7 @@ func DownloadAndExtractDockerImage(temp, image, dest string, auth *types.AuthCon
|
||||
err = c.Unpack(image, dest)
|
||||
return listedImage, err
|
||||
}
|
||||
|
||||
func StripInvalidStringsFromImage(s string) string {
|
||||
return strings.ReplaceAll(s, "+", "-")
|
||||
}
|
||||
|
Reference in New Issue
Block a user