Skip to content

Commit ecae8ed

Browse files
committed
Initial commit
0 parents  commit ecae8ed

File tree

8 files changed

+374
-0
lines changed

8 files changed

+374
-0
lines changed
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: Rebuild README
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
paths:
8+
- catalog.yaml
9+
- generator/README.md.handlebars
10+
11+
permissions:
12+
contents: write
13+
14+
jobs:
15+
rebuild-readme:
16+
runs-on: ubuntu-latest
17+
steps:
18+
- name: Checkout repository
19+
uses: actions/checkout@v4
20+
21+
- name: Setup Node.js
22+
uses: actions/setup-node@v4
23+
with:
24+
node-version: '20'
25+
26+
- name: Install dependencies
27+
run: npm install
28+
working-directory: generator
29+
30+
- name: Run generator
31+
run: node generators/index.js
32+
33+
- name: Commit and push updated README
34+
run: |
35+
git config --global user.name "github-actions[bot]"
36+
git config --global user.email "github-actions[bot]@users.noreply.github.com"
37+
git add README.md
38+
git commit -m "chore: update README.md via generator" || echo "No changes to commit"
39+
git push

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
node_modules

README.md

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
<!--- This file is generated by the script at generator/index.js. Do not edit directly. -->
2+
3+
# Awesome Labspaces
4+
5+
This repository contains a collection of awesome Labspaces. Each Labspace is designed to provide hands-on experience and practical knowledge in a specific area.
6+
7+
## Opening a Labspace
8+
9+
To open a Labspace, you can use the following Compose command:
10+
11+
```bash
12+
docker compose -f oci://${PUBLISHED_REPO} up
13+
```
14+
15+
If you have the Docker Desktop extension installed, you can click the "Open in Docker Desktop" link with each listing.
16+
17+
## The Awesome List
18+
19+
**Skill level**: &nbsp;⭐⭑⭑ - Beginner &nbsp; ⭐⭐⭑ - Intermediate &nbsp; ⭐⭐⭐ - Advanced
20+
21+
Each Labspace is categorized by tags. Below is the list of available Labspaces (a single Labspace may be in multiple categories):
22+
23+
### **AI**
24+
25+
- ⭐⭑⭑ [Using MCP Servers with the MCP Gateway](https://github.com/dockersamples/labspace-mcp-gateway) (Docker)
26+
- Learn how to use the Docker MCP Gateway to provide your agentic applications with the tools they need to perform complex tasks.
27+
- Published repo: `dockersamples/labspace-mcp-gateway`
28+
- [Open in Docker Desktop](http://open.docker.com/dashboard/extension-tab?extensionId=dockersamples%2Flabspace-extension&location=dockersamples%252Flabspace-mcp-gateway&title=Using%2520MCP%2520Servers%2520with%2520the%2520MCP%2520Gateway)
29+
30+
### **Getting Started**
31+
32+
- ⭐⭑⭑ [Container-supported development](https://github.com/dockersamples/labspace-container-supported-development) (Docker)
33+
- Run databases, debug tools, and more across your entire team with minimal setup.
34+
- Published repo: `dockersamples/labspace-container-supported-development`
35+
- [Open in Docker Desktop](http://open.docker.com/dashboard/extension-tab?extensionId=dockersamples%2Flabspace-extension&location=dockersamples%252Flabspace-container-supported-development&title=Container-supported%2520development)
36+
- ⭐⭑⭑ [Using MCP Servers with the MCP Gateway](https://github.com/dockersamples/labspace-mcp-gateway) (Docker)
37+
- Learn how to use the Docker MCP Gateway to provide your agentic applications with the tools they need to perform complex tasks.
38+
- Published repo: `dockersamples/labspace-mcp-gateway`
39+
- [Open in Docker Desktop](http://open.docker.com/dashboard/extension-tab?extensionId=dockersamples%2Flabspace-extension&location=dockersamples%252Flabspace-mcp-gateway&title=Using%2520MCP%2520Servers%2520with%2520the%2520MCP%2520Gateway)
40+
41+
### **MCP Gateway**
42+
43+
- ⭐⭑⭑ [Using MCP Servers with the MCP Gateway](https://github.com/dockersamples/labspace-mcp-gateway) (Docker)
44+
- Learn how to use the Docker MCP Gateway to provide your agentic applications with the tools they need to perform complex tasks.
45+
- Published repo: `dockersamples/labspace-mcp-gateway`
46+
- [Open in Docker Desktop](http://open.docker.com/dashboard/extension-tab?extensionId=dockersamples%2Flabspace-extension&location=dockersamples%252Flabspace-mcp-gateway&title=Using%2520MCP%2520Servers%2520with%2520the%2520MCP%2520Gateway)
47+

catalog.yaml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
tags:
2+
- name: ai
3+
label: AI
4+
- name: dmr
5+
label: Docker Model Runner
6+
- name: getting-started
7+
label: Getting Started
8+
- name: mcp-gateway
9+
label: MCP Gateway
10+
11+
labspaces:
12+
- title: Container-supported development
13+
description: |
14+
Run databases, debug tools, and more across your entire team with minimal setup.
15+
repo: https://github.com/dockersamples/labspace-container-supported-development
16+
publishedRepo: dockersamples/labspace-container-supported-development
17+
author: Docker
18+
datePublished: 2025-09-16
19+
level: Beginner
20+
tags:
21+
- getting-started
22+
23+
- title: Using MCP Servers with the MCP Gateway
24+
description: |
25+
Learn how to use the Docker MCP Gateway to provide your agentic applications with the tools they need to perform complex tasks.
26+
repo: https://github.com/dockersamples/labspace-mcp-gateway
27+
publishedRepo: dockersamples/labspace-mcp-gateway
28+
author: Docker
29+
datePublished: 2025-09-18
30+
level: Beginner
31+
tags:
32+
- ai
33+
- mcp-gateway
34+
- getting-started

generator/README.md.handlebars

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# Awesome Labspaces
2+
3+
This repository contains a collection of awesome Labspaces. Each Labspace is designed to provide hands-on experience and practical knowledge in a specific area.
4+
5+
## Opening a Labspace
6+
7+
To open a Labspace, you can use the following Compose command:
8+
9+
```bash
10+
docker compose -f oci://${PUBLISHED_REPO} up
11+
```
12+
13+
If you have the Docker Desktop extension installed, you can click the "Open in Docker Desktop" link with each listing.
14+
15+
## The Awesome List
16+
17+
**Skill level**: &nbsp;⭐⭑⭑ - Beginner &nbsp; ⭐⭐⭑ - Intermediate &nbsp; ⭐⭐⭐ - Advanced
18+
19+
Each Labspace is categorized by tags. Below is the list of available Labspaces (a single Labspace may be in multiple categories):
20+
21+
{{#each tags}}
22+
### **{{this.label}}**
23+
24+
{{#each this.labspaces}}
25+
- {{difficultyStars this.level}} [{{this.title}}]({{this.repo}}) ({{this.author}})
26+
- {{trim this.description}}
27+
- Published repo: `{{this.publishedRepo}}`
28+
- {{ddLink this}}
29+
{{/each}}
30+
31+
{{/each}}

generator/index.js

Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
import fs from "fs";
2+
import zod from "zod";
3+
import { parse } from "yaml";
4+
import Handlebars from "handlebars";
5+
6+
const __dirname = new URL('.', import.meta.url).pathname;
7+
8+
const README_PREFACE = "<!--- This file is generated by the script at generator/index.js. Do not edit directly. -->\n\n";
9+
10+
validate()
11+
.then(generateReadme)
12+
.then(readme => fs.writeFileSync(__dirname + "/../README.md", README_PREFACE + readme))
13+
.catch(console.error);
14+
15+
async function validate() {
16+
const data = parse(fs.readFileSync(__dirname + '/../catalog.yaml', 'utf8'));
17+
18+
const availableTags = data.tags.map(tag => tag.name);
19+
20+
const LabspacesSchema = zod.array(
21+
zod.object({
22+
title: zod.string(),
23+
description: zod.string(),
24+
repo: zod.url(),
25+
publishedRepo: zod.string(),
26+
author: zod.string(),
27+
datePublished: zod.date()
28+
.min(new Date("2025-09-01"), { error: "Can't have a date before launch" })
29+
.max(new Date(), { error: "Can't have a future date" }),
30+
level: zod.enum(['Beginner', 'Intermediate', 'Advanced']),
31+
tags: zod.array(zod.enum(availableTags)),
32+
})
33+
);
34+
35+
const errors = [];
36+
for (let lab of data.labspaces) {
37+
if (lab.datePublished) {
38+
lab.datePublished = new Date(lab.datePublished);
39+
}
40+
}
41+
42+
const result = LabspacesSchema.safeParse(data.labspaces);
43+
if (!result.success) {
44+
for (let err of result.error.issues) {
45+
errors.push(`Error at labspaces.${err.path.join('.')} : ${err.message}`);
46+
}
47+
}
48+
49+
if (errors.length > 0) {
50+
throw new Error("Validation errors found: \n - " + errors.join("\n - "));
51+
}
52+
53+
return data;
54+
}
55+
56+
async function generateReadme(data) {
57+
Handlebars.registerHelper('hasTag', function (labspace, requiredTag) {
58+
return labspace.tags.includes(requiredTag);
59+
});
60+
61+
Handlebars.registerHelper("trim", (str) => str.trim());
62+
63+
Handlebars.registerHelper("ddLink", (labspace) => {
64+
const url = new URL("http://open.docker.com/dashboard/extension-tab?extensionId=dockersamples/labspace-extension");
65+
url.searchParams.set("location", encodeURIComponent(labspace.publishedRepo));
66+
url.searchParams.set("title", encodeURIComponent(labspace.title));
67+
return new Handlebars.SafeString(`[Open in Docker Desktop](${url.toString()})`);
68+
});
69+
70+
Handlebars.registerHelper("difficultyStars", (level) => {
71+
switch (level) {
72+
case "Beginner":
73+
return "⭐⭑⭑";
74+
case "Intermediate":
75+
return "⭐⭐⭑";
76+
case "Advanced":
77+
return "⭐⭐⭐";
78+
default:
79+
return "";
80+
}
81+
});
82+
83+
const tags = data.tags.map(tag => ({
84+
...tag,
85+
labspaces: data.labspaces
86+
.filter(labspace => labspace.tags.includes(tag.name))
87+
.sort((a, b) => b.datePublished > a.datePublished)
88+
})).filter(tag => tag.labspaces.length > 0);
89+
90+
const template = Handlebars.compile(fs.readFileSync(__dirname + "/README.md.handlebars", "utf8"));
91+
92+
return template({ tags });
93+
}

generator/package-lock.json

Lines changed: 103 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

generator/package.json

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
{
2+
"name": "awesome-labspaces",
3+
"version": "1.0.0",
4+
"main": "index.js",
5+
"scripts": {
6+
"start": "node index.js"
7+
},
8+
"type": "module",
9+
"repository": {
10+
"type": "git",
11+
"url": "git+https://github.com/mikesir87/awesome-labspaces.git"
12+
},
13+
"keywords": [],
14+
"author": "",
15+
"license": "Apache-2.0",
16+
"bugs": {
17+
"url": "https://github.com/mikesir87/awesome-labspaces/issues"
18+
},
19+
"homepage": "https://github.com/mikesir87/awesome-labspaces#readme",
20+
"description": "",
21+
"dependencies": {
22+
"handlebars": "^4.7.8",
23+
"yaml": "^2.8.1",
24+
"zod": "^4.1.9"
25+
}
26+
}

0 commit comments

Comments
 (0)