How to generate container image using CodeDirect
This guide shows you how to build a container image from source code stored in a GitHub repository using Webscale CodeDirect. The resulting image will be pushed to your configured image registry. You will also learn how to manually trigger a build and view its logs.
Prerequisites
Before you begin, ensure you have:
-
A GitHub repository that contains a Dockerfile
-
An image registry configured under Providers (e.g., AWS ECR)
Follow the steps below if you have not already configured your AWS ECR registry:
- Go to the Providers tab
- Edit an AWS provider
- Enable Use for ECR
- Provide the registry endpoint
- Specify a repository
1. Create a New Builder
-
Click the blue plus (+) button to create a new Builder.
You will see configuration sections for:
- Build context
- Image destination
- Build configuration
- Build triggers
We will focus on the required fields in this guide.
2. Configure the Build Context
- Expand the Build context panel and click Connect a repository or select an already connected repository.
- Follow the prompts to authorize GitHub and select a repository that contains a Dockerfile.
- After completing the connection, return to the Builder and select your repository from the dropdown.
3. Configure the Image Destination
- Expand the Image destination panel and choose your configured image registry.
- Select the image repository where the built image will be pushed.
4. Set the Build Configuration
- Expand the Build configuration panel and provide the relative path to your Dockerfile in your source repository.
5. Optionally specify Build Triggers
If you would like a build to be triggered whenever code is pushed to the repository, select “Build on commit” and specify which branches you would like to trigger a build.
Otherwise, leave this section blank.
6. Save the Builder
Click Submit to save the Builder.
You now have a Builder capable of producing container images.
7. Manually Trigger a Build
- In the Builders list, locate your newly created Builder.
- Click the play (▶) button next to it.
- Leave the source reference at HEAD and click Submit.
This action creates a new build task.
8. View Build Progress and Logs
- Watch for the spinning arrows icon in the top-right corner of the Control Panel. This indicates that a task is running.
- Click the icon, then click Zoom to open the build logs.
Look for key log entries such as:
- “Cloning git repository…” — confirms the source repo is being pulled
- “Checking out specific commit:
” — shows which commit was used - “Pushing image to …” — indicates the registry, repository, and tag for the final image
✅ indicates the build was successful. ❌ indicates the build failed.
Result
You have successfully:
- Created a CodeDirect Builder
- Connected it to a GitHub repository
- Configured your output image registry
- Triggered a manual build
- Viewed the build logs
You can now extend your builder with automatic triggers, config files, and secure secret injection as needed.
Feedback
Was this page helpful?
Glad to hear it! Have any more feedback? Please share it here.
Sorry to hear that. Have any more feedback? Please share it here.