mirror of
https://github.com/balena-os/balena-supervisor.git
synced 2025-01-04 13:04:12 +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) =>
|
(svc) =>
|
||||||
_.find(availableImages, {
|
_.find(availableImages, {
|
||||||
dockerImageId: svc.config.image,
|
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 }),
|
}) ?? _.find(availableImages, { dockerImageId: svc.config.image }),
|
||||||
),
|
),
|
||||||
) as imageManager.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
|
// Normalise an image name to always have a tag, with :latest being the default
|
||||||
export function normaliseImageName(image: string) {
|
export function normaliseImageName(image: string) {
|
||||||
const { registry, imageName, tagName, digest } = getRegistryAndName(image);
|
const { registry, imageName, tagName, digest } = getRegistryAndName(image);
|
||||||
const repository = [registry, imageName].join('/');
|
const repository = [registry, imageName].filter((s) => !!s).join('/');
|
||||||
|
|
||||||
if (!digest) {
|
if (!digest) {
|
||||||
return [repository, tagName || 'latest'].join(':');
|
return [repository, tagName || 'latest'].join(':');
|
||||||
|
Loading…
Reference in New Issue
Block a user