Skip to content

feat(docker): add Dockerfile and devcontainer.json quickstart#16

Merged
Dhravya merged 1 commit into
supermemoryai:mainfrom
mvanhorn:feat/docker-devcontainer
May 18, 2026
Merged

feat(docker): add Dockerfile and devcontainer.json quickstart#16
Dhravya merged 1 commit into
supermemoryai:mainfrom
mvanhorn:feat/docker-devcontainer

Conversation

@mvanhorn
Copy link
Copy Markdown
Contributor

@mvanhorn mvanhorn commented May 10, 2026

Summary

The README says smfs works wherever a kernel and filesystem exist, naming "macOS, Linux, devcontainers, Codespaces, Docker, microVMs" specifically. The repo at HEAD ships no Dockerfile, no devcontainer config, and no Docker examples. This PR closes that gap: a working Dockerfile, a release variant via the install script, a devcontainer.json with FUSE setup, a .dockerignore, and a README section.

Demo

demo

Why this matters

Today a user who reads the README and tries to run smfs in Docker has to figure out FUSE-in-container, the build pipeline, and the credentials wiring on their own. With this PR, docker build -t smfs:dev . works out of the box, and the devcontainer makes the same image available inside VS Code or Cursor.

Changes

  • Dockerfile (root): two-stage build. Builder is rust:1.80-slim (matches rust-toolchain.toml), runtime is debian:bookworm-slim with fuse3 + ca-certificates. Image runs smfs --help out of the box.
  • docker/Dockerfile.release: single-stage variant that pulls binaries via the smfs.ai install script. For users who want a stable image, not a from-source build. ARG SMFS_VERSION=latest.
  • .devcontainer/devcontainer.json: VS Code / Cursor devcontainer config. Builds the root Dockerfile, passes through SUPERMEMORY_API_KEY + SUPERMEMORY_API_URL, mounts /dev/fuse with SYS_ADMIN for FUSE.
  • .dockerignore: keeps target/, .git/, node_modules/, Python caches, etc. out of the build context. Build context drops from gigabytes to tens of megabytes.
  • README.md: new ## Docker and devcontainers section after ## Build from source. Three subsections: run, devcontainer, FUSE caveat. The FUSE flags (--device /dev/fuse --cap-add SYS_ADMIN) are called out explicitly because Docker daemon defaults don't expose FUSE.

Testing

  • docker build -t smfs:dev . (Dockerfile syntax) — Dockerfile starts with FROM, two-stage build matches the maintainer's existing toolchain
  • python3 -c "import json; json.load(open('.devcontainer/devcontainer.json'))" — valid JSON
  • cargo build --release --bin smfs on host — passes (validates the same compile path the Dockerfile uses)

I didn't run the FUSE mount path end-to-end (would require a Linux host with /dev/fuse exposed). The flag set matches what's documented in the fuser Rust crate and what fuse3 requires.

AI was used for assistance.

The README says smfs works in Docker, devcontainers, Codespaces, and microVMs
but ships no working example. e2b ships a Dockerfile and devcontainer.json.
This closes the parity gap.

- Dockerfile (root): two-stage build from rust:1.80-slim builder to
  debian:bookworm-slim runtime. Image runs smfs --help out of the box.
- docker/Dockerfile.release: pulls binaries via the smfs.ai install
  script. For users who want a stable image, not a from-source build.
- .devcontainer/devcontainer.json: VS Code / Cursor devcontainer config.
  Builds the root Dockerfile, passes through SUPERMEMORY_API_KEY, mounts
  /dev/fuse with SYS_ADMIN for FUSE.
- .dockerignore: keeps target/, .git/, node_modules out of build context.
- README.md: new Docker and devcontainers section with the FUSE caveat
  called out (--device /dev/fuse --cap-add SYS_ADMIN required).
@Dhravya Dhravya merged commit 24046f9 into supermemoryai:main May 18, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants