docs/content/en/reference/extensibility/build-time/index.md
Meshery supports build-time extensibility, allowing system integrators to customize the Meshery container image during the Docker build process. This extension point enables organizations to inject custom configurations, data, provider extensions, and other resources directly into the Meshery container image at build-time.
The build-time extension point allows you to supply custom content by placing a .meshery directory at the root of the Meshery repository before building the Docker image. The contents of this directory will be copied into the container image and made available to Meshery at runtime.
.meshery directory at the root of the Meshery repository (same level as the Dockerfile).docker build as usual. The Docker build process will automatically copy the .meshery directory and its contents into the container image at /home/appuser/.meshery/./home/appuser/.meshery/.meshery/ # Repository root
├── .meshery/ # Build-time extension directory (optional)
│ ├── config/ # Custom configuration files
│ ├── provider/ # Provider-specific extensions
│ ├── content/ # Custom patterns, filters, applications
│ └── ... # Any other custom content
├── install/
│ └── docker/
│ └── Dockerfile # Main Dockerfile
└── ...
Place custom configuration files that should be bundled with your Meshery deployment:
mkdir -p .meshery/config
echo "custom_setting=value" > .meshery/config/custom.conf
Include proprietary or organization-specific provider extensions:
mkdir -p .meshery/provider/MyProvider/v1.0.0
cp /path/to/provider-extension.tar.gz .meshery/provider/MyProvider/v1.0.0/
Add organization-specific patterns, filters, or applications:
mkdir -p .meshery/content/patterns
cp /path/to/custom-patterns/* .meshery/content/patterns/
Include pre-downloaded models or manifests that might not be available at runtime:
mkdir -p .meshery/models
cp -r /path/to/custom-models/* .meshery/models/
To build a Meshery container image with your custom build-time extensions:
# Create your .meshery directory with custom content
mkdir -p .meshery/config
echo "my_config=value" > .meshery/config/custom.conf
# Build the Docker image (from the repository root)
docker build -f install/docker/Dockerfile -t meshery:custom .
The build process will:
.meshery directory).meshery directory in a build stage.meshery directory contents to /home/appuser/.meshery/ in the final imageAt runtime, Meshery will have access to:
/home/appuser/.meshery/seed_content/ (standard Meshery seed content)/home/appuser/.meshery/config/ (Meshery configuration files).meshery/ during buildYour custom content in .meshery/ will be merged with the standard Meshery directories. The contents are owned by the appuser user in the container.
.meshery directory is optional. If not present during build, the Docker build will continue without errors.config), the contents will be merged..meshery directory will be owned by appuser:appuser in the container..meshery directory at the repository root is typically not committed to version control. Add it to .gitignore if you're creating temporary build-time extensions.When using build-time extensions:
.meshery directory before building to ensure no sensitive information or malicious content is included..meshery directory. Use environment variables or runtime configuration for sensitive data.Meshery supports multiple extension points at different stages:
| Extension Point | When | Use Case |
|---|---|---|
| Build-time | During docker build | Pre-package custom configurations, offline packages, proprietary plugins |
| Boot-time | Container startup | Dynamic configuration that can change between deployments |
| Runtime | While Meshery is running | User-installed plugins, dynamically loaded extensions |
Choose the build-time extension point when you need to:
My .meshery directory isn't being copied
install/docker/Dockerfile).dockerignorePermission denied errors at runtime
appuser:appuser.meshery directoryBuild fails with "no such file or directory"
.meshery directory is optional