Dockerfile
Use a standard Dockerfile to define your development environment. Install the tools, runtimes, and dependencies your workflow needs.Why Dockerfiles?
Using Dockerfiles for base images provides:- Familiarity: Use the same syntax you already know
- Version control: Check your environment definition into git alongside your code
- Flexibility: Install any software, configure any tools, customize any settings
- Portability: Share consistent environments across your entire team
Building an Image
The argument todevbox image build is the build context directory. By default, it looks for a Dockerfile in that directory.
--name is required. Use a descriptive name like my-team/golang or frontend/node20. The image is published to your workspace and available immediately.
Use -f to point to a Dockerfile in a different location. This is useful in a monorepo where the Dockerfile lives in a subdirectory but you need the full repo as context:
.dockerignore to keep the upload small.
Run devbox image build -h for additional options.
Optimization
After a build completes, Namespace converts the container image into an optimized disk format. This is what allows Devboxes to boot in seconds rather than pulling and unpacking a container image on every start. Optimization runs automatically and typically takes a few minutes. You can track its progress in the CLI output and in the Images dashboard.Creating a Devbox from Your Image
Once your image is built, create Devboxes from it. Via the CLI:Managing Images
Listing Images
Updating an Image
Rebuild with the same--name to publish a new version. New Devboxes will use the latest version; existing Devboxes continue using the version they were created with.