Building Images
EMB manages Docker image builds with automatic tagging based on your project configuration.
Listing Resources
Section titled “Listing Resources”First, see what resources are available:
emb resources ID NAME TYPE PUBLISHABLE REFERENCE----------------------------------------------------------------------- api:image image docker/image fullstack-app/api:latest web:image image docker/image fullstack-app/web:latestEach component has an image resource that can be built.
Building All Images
Section titled “Building All Images”Build all images at once:
emb resources buildEMB will:
- Determine the build order (respecting dependencies)
- Build each image with appropriate tags
- Cache results to avoid rebuilding unchanged images
Building Specific Components
Section titled “Building Specific Components”Build just one component:
emb resources build apiOr multiple:
emb resources build api webImage Naming
Section titled “Image Naming”Images are tagged using the pattern:
{project-name}/{component-name}:{tag}For our project with DOCKER_TAG=latest:
fullstack-app/api:latestfullstack-app/web:latest
Viewing Built Images
Section titled “Viewing Built Images”After building, see your images:
emb imagesForce Rebuild
Section titled “Force Rebuild”Skip the cache and force a full rebuild:
emb resources build --forceDry Run
Section titled “Dry Run”See what would be built without actually building:
emb resources build --dry-runBuild Logs
Section titled “Build Logs”Build logs are saved to .emb/default/logs/docker/build/. If a build fails, check the log for details.
Custom Tags
Section titled “Custom Tags”Override the tag at build time:
DOCKER_TAG=v1.0.0 emb resources buildThis builds with tag v1.0.0 instead of latest.
Summary
Section titled “Summary”You’ve now learned the fullstack-app features:
- Multiple components with Embfiles
- Environment variables via dotenv plugin
- Tasks at project and component levels
- Docker Compose for running services
- Image building with automatic tagging
Next Tutorial
Section titled “Next Tutorial”Ready to learn about component dependencies? Continue to Microservices to explore:
- Shared base images
- Component dependencies
- Build ordering