Skip to content

Commit 99931cf

Browse files
authored
fix(CLI): temporarly fix for starting the container (#42)
* updated image with tag and related workarounds * used imported image name
1 parent 0a8ef58 commit 99931cf

File tree

4 files changed

+10
-6
lines changed

4 files changed

+10
-6
lines changed

ui/src/components/Feedback/DownloadProgress/DownloadProgress.tsx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ import { useDDClient } from '../../../services';
33
import { CircularProgressWithLabel } from './CircularProgressWithLabel';
44

55
const SKIPPING_KEY = 'latest';
6+
const SKIPPING_ERROR = 'What\'s Next?';
7+
const SKIPPING_TAG_MESSAGE = 'Pulling from'; // message that get's sent if you pull a specific tag
68
const END_KEYS = ['Digest', 'Status'];
79

810
const statusValues = new Map([
@@ -35,13 +37,14 @@ export const DownloadProgress = ({ callback, imageName }: DownloadProgressProps)
3537
ddClient.docker.cli.exec('pull', [imageName], {
3638
stream: {
3739
onOutput(data): void {
38-
if (data.stderr) {
40+
if (data.stderr && data.stderr !== SKIPPING_ERROR) {
3941
ddClient.desktopUI.toast.error(data.stderr);
4042
}
4143

4244
const [key, status] = data.stdout.split(':').map(item => item.trim());
4345

44-
if ([key, status].includes(SKIPPING_KEY)) { // prevent inserting in the map non related info
46+
if ([key, status].includes(SKIPPING_KEY) ||
47+
status.startsWith(SKIPPING_TAG_MESSAGE)) { // prevent inserting in the map non related info
4548
return;
4649
}
4750

ui/src/components/Header/Controller.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ export const Controller = (): ReactElement => {
9191
const isPro = runConfigs.find(config => config.name === runningConfig)
9292
.vars.some(item => item.variable === 'LOCALSTACK_API_KEY');
9393

94-
const haveCommunity = images.some(image => removeTagFromImage(image) === IMAGE);
94+
const haveCommunity = images.some(image => image.RepoTags?.at(0) === IMAGE);
9595
if (!haveCommunity) {
9696
setDownloadProps({ open: true, image: IMAGE });
9797
return;
@@ -106,7 +106,6 @@ export const Controller = (): ReactElement => {
106106
}
107107

108108
const args = await normalizeArguments();
109-
110109
setIsStarting(true);
111110
ddClient.docker.cli.exec('run', args, {
112111
stream: {

ui/src/constants/common.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
export const DEFAULT_CONFIGURATION_ID='00000000-0000-0000-0000-000000000000';
22
export const CORS_ALLOW_DEFAULT='http://localhost:3000';
3-
export const IMAGE = 'localstack/localstack';
3+
export const IMAGE = 'localstack/localstack:2.1.0';
44
export const PRO_IMAGE = 'localstack/localstack-pro';

ui/src/constants/docker.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import { IMAGE } from './common';
2+
13
const COMMON_ARGS = [
24
'--label',
35
'cloud.localstack.spawner=true',
@@ -6,7 +8,7 @@ const COMMON_ARGS = [
68
'--entrypoint=',
79
'-v',
810
'/var/run/docker.sock:/var/run/docker.sock',
9-
'localstack/localstack',
11+
IMAGE,
1012
'bin/localstack',
1113
];
1214

0 commit comments

Comments
 (0)