Skip to content

Commit 0af920c

Browse files
authored
Merge pull request #271 from docker/use-s3-catalog-file
Use s3 catalog as target instead of Github
2 parents bc62350 + 186ffb2 commit 0af920c

File tree

2 files changed

+25
-17
lines changed

2 files changed

+25
-17
lines changed

src/extension/ui/src/Constants.ts

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,27 @@
1-
export const MCP_POLICY_NAME = "MCP=*";
1+
export const MCP_POLICY_NAME = 'MCP=*';
22
export const DD_BUILD_WITH_SECRET_SUPPORT = 184396;
3-
export const CATALOG_URL = "http://localhost:9911/catalog.yaml";
43
// export const CATALOG_URL = "https://raw.githubusercontent.com/docker/labs-ai-tools-for-devs/refs/heads/main/prompts/catalog.yaml";
4+
export const CATALOG_URL = import.meta.env.DEV
5+
? '/catalog'
6+
: 'https://desktop.docker.com/mcp/catalog/catalog.yaml';
57

68
export const getUnsupportedSecretMessage = (ddVersion: {
79
version: string;
810
build: number;
911
}) =>
1012
`Secret support is not available in this version of Docker Desktop. You are on version ${ddVersion.version}, but the minimum required version is 4.40.0.`;
1113

12-
export const DOCKER_MCP_IMAGE = "alpine/socat";
13-
export const DOCKER_MCP_CONTAINER_ARGS = "STDIO TCP:host.docker.internal:8811";
14+
export const DOCKER_MCP_IMAGE = 'alpine/socat';
15+
export const DOCKER_MCP_CONTAINER_ARGS = 'STDIO TCP:host.docker.internal:8811';
1416
export const DOCKER_MCP_COMMAND = `docker run -i --rm ${DOCKER_MCP_IMAGE} ${DOCKER_MCP_CONTAINER_ARGS}`;
1517

1618
export const CATALOG_LAYOUT_SX = {
17-
width: "90vw",
18-
maxWidth: "1200px",
19+
width: '90vw',
20+
maxWidth: '1200px',
1921
};
2022

21-
export const ASSIGNED_SECRET_PLACEHOLDER = "********";
23+
export const ASSIGNED_SECRET_PLACEHOLDER = '********';
2224

2325
// Filenames in docker-prompts volume
24-
export const REGISTRY_YAML = 'registry.yaml'
25-
export const CONFIG_YAML = 'config.yaml'
26+
export const REGISTRY_YAML = 'registry.yaml';
27+
export const CONFIG_YAML = 'config.yaml';

src/extension/ui/vite.config.ts

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,22 @@
1-
import { defineConfig } from "vite";
2-
import react from "@vitejs/plugin-react";
1+
import react from '@vitejs/plugin-react';
2+
import { defineConfig } from 'vite';
33

44
// https://vitejs.dev/config/
55
export default defineConfig({
66
plugins: [react()],
7-
base: "./",
7+
base: './',
88
build: {
9-
outDir: "build",
9+
outDir: 'build',
1010
chunkSizeWarningLimit: 100,
1111
rollupOptions: {
1212
output: {
1313
manualChunks: {
14-
vendor: ["react", "react-dom"],
15-
"ui-libs": ["@mui/material", "@emotion/react", "@emotion/styled"],
14+
vendor: ['react', 'react-dom'],
15+
'ui-libs': ['@mui/material', '@emotion/react', '@emotion/styled'],
1616
},
1717
},
1818
onwarn(warning, warn) {
19-
if (warning.code === "MODULE_LEVEL_DIRECTIVE") {
19+
if (warning.code === 'MODULE_LEVEL_DIRECTIVE') {
2020
return;
2121
}
2222
warn(warning);
@@ -26,6 +26,12 @@ export default defineConfig({
2626
assetsInclude: ['./static-assets/**/*'],
2727
server: {
2828
port: 3000,
29-
strictPort: true,
29+
proxy: {
30+
'/catalog': {
31+
target: 'https://desktop.docker.com/mcp/catalog/catalog.yaml',
32+
changeOrigin: true,
33+
rewrite: (path) => path.replace(/^\/catalog/, ''),
34+
},
35+
},
3036
},
3137
});

0 commit comments

Comments
 (0)