Pass a customized docker compose file's name in the .conf/createDockerComposeProduction.ps1

Hi, I’m the Toradex AI Assistant. The Toradex Support team will follow up with you shortly!

Did you like my answer?

:+1: :-1:


Based on the context provided, it seems that you are trying to modify the createDockerComposeProduction.ps1 script to use a custom-named Docker Compose file. The error you are encountering suggests that the script is not correctly referencing your custom Docker Compose file.

To resolve this, you need to ensure that the -f switch is used in the docker compose build command within the createDockerComposeProduction.ps1 script to specify your custom Docker Compose file. Here’s a general approach you can take:

  1. Open the createDockerComposeProduction.ps1 script.
  2. Locate the section where the docker compose build command is executed.
  3. Modify the command to include the -f switch followed by the path to your custom Docker Compose file. For example:
    docker compose -f path/to/your-custom-docker-compose.yml build
    
  4. Save the changes to the script.

By specifying the custom Docker Compose file with the -f switch, the script should be able to locate and use your specified file for the build process. If the script is dynamically generating or referencing the Docker Compose file name, ensure that the variable or logic handling the file name is updated to reflect your custom file name.

Please, also check if these links can help you solve your problem:

Docker-compose.yml.