Skip to content

Commit 900c427

Browse files
authored
Update image fix (#39)
* Fixed issue of listing subset of images * added more filter * bumped up version
1 parent 99931cf commit 900c427

File tree

2 files changed

+13
-2
lines changed

2 files changed

+13
-2
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
IMAGE?=localstack/localstack-docker-desktop
2-
TAG?=0.4.1
2+
TAG?=0.4.2
33

44
BUILDER=buildx-multi-arch
55

ui/src/components/Header/Menu.tsx

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,14 @@ import { UpdateDialog } from '../Views';
88

99
const ITEM_HEIGHT = 80;
1010

11+
const IMAGE_PREFIXES = [
12+
'localstack/',
13+
'lambci/lambda:',
14+
'mlupin/docker-lambda:',
15+
'public.ecr.aws/lambda',
16+
];
17+
18+
1119
export const LongMenu = () => {
1220
const [anchorEl, setAnchorEl] = useState<null | HTMLElement>(null);
1321
const [openModal, setOpenModal] = useState<boolean>(false);
@@ -34,7 +42,10 @@ export const LongMenu = () => {
3442
const fetchImages = async () => {
3543
const images = (await ddClient.docker.listImages()) as DockerImage[];
3644

37-
const localstackImages = images.filter(image => image.RepoTags?.at(0)?.startsWith('localstack/'));
45+
const localstackImages = images.filter(image =>
46+
IMAGE_PREFIXES.some(prefix => image.RepoTags?.at(0)?.startsWith(prefix)) &&
47+
!image.RepoTags?.at(0)?.endsWith(':<none>'));
48+
3849
const imagesWithoutOrgName = localstackImages.map(image => removeRepoFromImage(image.RepoTags?.at(0)));
3950
setImages(imagesWithoutOrgName);
4051
};

0 commit comments

Comments
 (0)