Request
We currently build a clp-execution-base-ubuntu-jammy Docker image that only includes the dependencies required to run CLP components. The actual CLP package contents (binaries, Python packages, configuration files, etc.) are mapped into the container at runtime by the start_clp.py script. This approach is inconvenient as we plan to migrate to Docker Compose for starting package components.
The current workflow requires the start_clp.py script to:
- Create Docker mount options for the package directories
- Map the package contents into containers at runtime
- Handle various configuration files and environment variables
This approach is not compatible with Docker Compose which expects all necessary files to be present in the container image.
We need to create a new Docker image that includes all the CLP package contents directly in the image, allowing us to use Docker Compose without requiring the start_clp.py script to map package contents at runtime.
Possible implementation
-
Create a new Dockerfile:
- Create a new Dockerfile at
tools/docker-images/
- Use a new container name
clp-execution-package-ubuntu-jammy to avoid compatibility issues with clp-execution-base-ubuntu-jammy
- Duplicate the base image setup from
clp-execution-base-ubuntu-jammy instead of using clp-execution-base-ubuntu-jammy as a base
- Copy the built CLP package contents directly into the image during build time
- Set appropriate ownership and permissions for the copied files
-
Add a new Taskfile task:
- Add a new task in
taskfile.yaml to build this new Docker image
- The task should depend on the
package task to ensure the package is built first
- Name the task something like
docker-image-package-ubuntu-jammy
-
Integration approach:
- The new image should contain all necessary files in the expected locations:
- Binaries in
/opt/clp/bin
- Python packages in
/opt/clp/lib/python3/site-packages
- Configuration files in
/opt/clp/etc
- Web UI files in
/opt/clp/var/www/webui
- Other necessary directories and files
- Environment variables should be pre-configured or easily configurable via Docker Compose
- The image should be self-contained and able to run CLP components without external volume mounts for package contents
-
Build process modifications:
- The new Dockerfile should reference the built package from
build/clp-package
- The build task should properly tag the image for use with Docker Compose
- Consider adding build arguments for customization if needed
-
CI/CD workflow updates:
- Create a new GitHub Actions workflow similar to
clp-execution-image-build.yaml
- The workflow should automatically build and publish the new image when changes are made to its Dockerfile or related files
- Use path filtering to trigger builds only when relevant files change
- Follow the same pattern as the existing workflow for consistency
-
Migration path:
- The new image should maintain backward compatibility with existing configurations where possible
- Documentation should be updated to reflect the new approach
- The
start_clp.py script will be modified in a later phase to support both approaches during transition
When implementing this feature, we should carefully review how the current package build process works in taskfile.yaml and ensure the Docker image build integrates seamlessly with it. The new image should be built after the package is built, and should include all the contents that are currently mapped at runtime.
Request
We currently build a
clp-execution-base-ubuntu-jammyDocker image that only includes the dependencies required to run CLP components. The actual CLP package contents (binaries, Python packages, configuration files, etc.) are mapped into the container at runtime by thestart_clp.pyscript. This approach is inconvenient as we plan to migrate to Docker Compose for starting package components.The current workflow requires the
start_clp.pyscript to:This approach is not compatible with Docker Compose which expects all necessary files to be present in the container image.
We need to create a new Docker image that includes all the CLP package contents directly in the image, allowing us to use Docker Compose without requiring the
start_clp.pyscript to map package contents at runtime.Possible implementation
Create a new Dockerfile:
tools/docker-images/clp-execution-package-ubuntu-jammyto avoid compatibility issues withclp-execution-base-ubuntu-jammyclp-execution-base-ubuntu-jammyinstead of usingclp-execution-base-ubuntu-jammyas a baseAdd a new Taskfile task:
taskfile.yamlto build this new Docker imagepackagetask to ensure the package is built firstdocker-image-package-ubuntu-jammyIntegration approach:
/opt/clp/bin/opt/clp/lib/python3/site-packages/opt/clp/etc/opt/clp/var/www/webuiBuild process modifications:
build/clp-packageCI/CD workflow updates:
clp-execution-image-build.yamlMigration path:
start_clp.pyscript will be modified in a later phase to support both approaches during transitionWhen implementing this feature, we should carefully review how the current package build process works in
taskfile.yamland ensure the Docker image build integrates seamlessly with it. The new image should be built after the package is built, and should include all the contents that are currently mapped at runtime.