11# syntax=docker/dockerfile:1
22
3+ FROM alpine:3.21@sha256:a8560b36e8b8210634f77d9f7f9efd7ffa463e380b75e2e74aff4511df3ef88c AS alpine
4+
35FROM --platform=$BUILDPLATFORM node:23-alpine3.21@sha256:86703151a18fcd06258e013073508c4afea8e19cd7ed451554221dd00aea83fc AS client-builder
46WORKDIR /ui
57COPY ui/package.json ui/package-lock.json ./
68RUN --mount=type=cache,target=/root/.npm npm ci
79COPY ui/. .
810RUN --mount=type=cache,target=/root/.npm npm run build
911
10- FROM alpine:3.21@sha256:a8560b36e8b8210634f77d9f7f9efd7ffa463e380b75e2e74aff4511df3ef88c
12+ FROM alpine AS pull-catalog-images
13+ RUN apk add --no-cache curl yq
14+ COPY --from=prompts catalog.yaml /
15+ RUN <<EOT
16+ set -eo pipefail
17+
18+ mkdir -p /icons
19+ cat /catalog.yaml | yq -r '.registry[].icon' | while read -r iconUrl; do
20+ name=$(echo -n "$iconUrl" | md5sum | cut -d' ' -f1)
21+ echo "${iconUrl} -> ${name}"
22+ curl -fSl "$iconUrl" -o "/icons/${name}"
23+ done
24+ EOT
25+
26+ FROM alpine
1127ARG TARGETARCH
1228LABEL org.opencontainers.image.title="Docker MCP Toolkit" \
1329 org.opencontainers.image.description="Docker MCP Toolkit is a Docker Desktop Extension allowing to connect dockerized MCP servers to MCP clients" \
@@ -22,8 +38,8 @@ LABEL org.opencontainers.image.title="Docker MCP Toolkit" \
2238 com.docker.extension.changelog="Added MCP catalog"
2339
2440COPY docker-compose.yaml metadata.json extension-icon.svg /
25- COPY ui/static-assets ui/static-assets
2641COPY host-binary/dist/windows-${TARGETARCH}/host-binary.exe /windows/host-binary.exe
2742COPY host-binary/dist/darwin-${TARGETARCH}/host-binary /darwin/host-binary
2843COPY host-binary/dist/linux-${TARGETARCH}/host-binary /linux/host-binary
44+ COPY --from=pull-catalog-images /icons ui/static-assets
2945COPY --from=client-builder /ui/build ui
0 commit comments