codecrepos.docker_builder

Author: Ismael Seidel Affiliation: Embedded Computing Lab (ECL), Federal University of Santa Catarina (UFSC)

Description:

This module provides Docker-based codec compilation capabilities, allowing codecs to be built inside isolated Docker containers for consistency and portability.

class DockerBuilder(image_name='codecs-compilation')[source]

Bases: object

Builds codecs inside Docker containers.

Parameters:

image_name (str)

__init__(image_name='codecs-compilation')[source]

Initializes DockerBuilder with the Docker image name.

Parameters:

image_name (str) – Name of the Docker image for compilation, defaults to “codecs-compilation”

Returns:

None

Return type:

None

get_docker_build_command(repository_path, build_command)[source]

Builds the Docker run command for executing the build inside the container.

Parameters:
  • repository_path (str) – Path to the repository to mount

  • build_command (str) – Shell command to run inside the container

Returns:

Command as list of arguments for subprocess

Return type:

list

get_gcc_version()[source]

Gets the GCC version from the Docker container.

Returns:

First line of gcc –version output

Return type:

str