mirror of
https://github.com/balena-os/balena-supervisor.git
synced 2025-01-02 03:56:41 +00:00
Merge pull request #1760 from balena-os/images-local-mode
Fix regression with local mode push
This commit is contained in:
commit
57fc32e436
@ -674,7 +674,9 @@ function saveAndRemoveImages(
|
||||
(svc) =>
|
||||
_.find(availableImages, {
|
||||
dockerImageId: svc.config.image,
|
||||
name: svc.imageName,
|
||||
// There is no 1-1 mapping between services and images
|
||||
// on disk, so the only way to compare is by imageId
|
||||
imageId: svc.imageId,
|
||||
}) ?? _.find(availableImages, { dockerImageId: svc.config.image }),
|
||||
),
|
||||
) as imageManager.Image[];
|
||||
|
@ -80,7 +80,7 @@ export function getRegistryAndName(uri: string): ImageNameParts {
|
||||
// Normalise an image name to always have a tag, with :latest being the default
|
||||
export function normaliseImageName(image: string) {
|
||||
const { registry, imageName, tagName, digest } = getRegistryAndName(image);
|
||||
const repository = [registry, imageName].join('/');
|
||||
const repository = [registry, imageName].filter((s) => !!s).join('/');
|
||||
|
||||
if (!digest) {
|
||||
return [repository, tagName || 'latest'].join(':');
|
||||
|
Loading…
Reference in New Issue
Block a user