Container-Make (cm) transforms your devcontainer.json into a powerful CLI artifact.
It fuses the speed of Makefiles, the isolation of Docker, and the intelligence of VSCode DevContainers into a single, lethal binary.
|
Your |
|
|
Leverages Docker BuildKit for aggressive caching. Your environment spins up in seconds, not minutes. |
Dependencies live in the container, not on your host OS. Keep your machine clean. |
Build from source or download the binary.
git clone https://github.com/container-make/cm.git
cd cm && go build -o cm ./cmd/cmGenerate shell aliases for a seamless experience.
./cm init
# Follow the on-screen instructions to update your .bashrc/.zshrcGo to any project with a .devcontainer folder and run commands.
# Prepare the environment (Pre-build image)
cm prepare
# Run any command inside the container
cm run -- go build -o app main.go
cm run -- npm install
cm run -- python train.py
# Drop into an interactive shell
cm run -- /bin/bashWe support the standard devcontainer.json specification.
Container-Make (cm) 将您的 devcontainer.json 转化为一个强大的命令行工具。它集成了 Makefile 的极致速度、Docker 的绝对隔离以及 DevContainers 的现代开发体验。
|
使用 |
|
|
利用 Docker BuildKit 的激进缓存策略。环境启动仅需秒级,而非分钟级。 |
所有依赖均活在容器内,保持宿主机纯净。告别 "it works on my machine"。 |
从源码编译或下载二进制文件。
git clone https://github.com/container-make/cm.git
cd cm && go build -o cm ./cmd/cm生成 Shell 别名,获得无缝体验。
./cm init
# 按照屏幕提示更新您的 .bashrc 或 .zshrc进入任何包含 .devcontainer 文件夹的项目即可执行。
# 准备环境 (预构建镜像)
cm prepare
# 在容器内运行任意命令
cm run -- go build -o app main.go
cm run -- npm install
cm run -- python train.py
# 进入交互式终端
cm run -- /bin/bash我们支持标准的 devcontainer.json 规范。
// .devcontainer/devcontainer.json
{
// 基础镜像
"image": "mcp/firecrawl:latest",
// 端口自动转发 (映射到 localhost)
"forwardPorts": [8080],
// 注入环境变量
"containerEnv": {
"APP_ENV": "development"
},
// 生命周期钩子
"postStartCommand": "echo '环境已就绪!'"
}