Overview
meshagent image is the CLI surface for working with OCI images in MeshAgent.
Use it when you want to:
- pack a local directory into an OCI archive
- build an image inside a room from room, project, image, or packed context
- deploy an image directly as a room service
How meshagent image fits into MeshAgent
meshagent image sits between source files and a deployable MeshAgent service:
meshagent image packturns a local directory into an OCI archive.meshagent image buildbuilds an image inside a room using mounted context.meshagent image deploycreates or updates a room service from that image.
- prepare files in the room
- build an image from those files inside the room
- deploy a service that uses that image
meshagent image especially useful for workflows where an agent is expected to build, test, and ship a containerized service for you from inside MeshAgent.
Commands
meshagent image pack
Use pack when you want to turn a local directory into an OCI archive.
This is useful when:
- you want a portable OCI archive locally
- you want to upload a packed context into a room
- you want to prepare a build context without pushing to an external registry first
--room is used, the tag must start with room.meshagent.com/.
meshagent image build
Use build when you want MeshAgent to build an image inside a room.
The build context can come from:
- room storage mounts
- project storage mounts
- mounted images
- a packed local directory uploaded with
--pack
Dockerfile, MeshAgent can use that Dockerfile during the room-side build. This means the build runs in MeshAgent rather than requiring a local Docker daemon on the machine that started the command.
Example using a packed local directory:
--tagis required--roomis required unlessMESHAGENT_ROOMis already set--packuploads a local directory to room storage and mounts it for the build- build logs stream back through the CLI while the build runs
- this is a good fit for agent-driven build workflows inside a room because the build happens in MeshAgent, not on the local machine
meshagent image deploy
Use deploy when you already have an image and want to create or update a room service from it.
Example:
- mount room storage with
--room-mount - mount project storage with
--project-mount - mount another image with
--image-mount - inject a
MESHAGENT_TOKENwith--env-token - publish a route with
--domainwhen the service exposes exactly one published port
How meshagent image works with service packaging
meshagent image and service packaging are complementary.
Use meshagent image when:
- your workflow is image-first
- you want to build inside a room
- you want to pack local content into a buildable OCI archive
- you want a fast path from image tag to room service
- you want an agent in the room to participate in building and shipping the service
- you are writing or reviewing a
meshagent.yaml - you need a fuller service spec with more explicit deployment structure
- you are working with ServiceTemplates or broader service configuration
meshagent image is the room-native image workflow, while service manifests are the broader service-definition workflow.