I want to run the create-production-image task from the TASK RUNNER.
I have changed the name of the docker compose file, so it’s not the defalut name anymore.
I could run the docker compose build in other tasks with passing the new name of the docker compose file without having any issues.
But when I want to pass the docker compose file’s name to the docker compose build command in the .conf/createDockerComposeProduction.ps1 script , I got the error
no configuration file provided: not found
What make sens of course. because docker compose file having another name
Or this error
unknown shorthand flag: ‘f’ in -f
when I have specified the new name of the docker compose file in the build command.
I knew that it 's done like passing the name of the not default docker compose file using the -f switch in the docker compose build command : docker compose build -f <docker-compose-custom-name>
But what about the one called in the .conf/createDockerComposeProduction.ps1 script ?
Here is a part of this script, exactly where the docker compose build is called:
Hi, I’m the Toradex AI Assistant. The Toradex Support team will follow up with you shortly!
Did you like my answer?
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:
Open the createDockerComposeProduction.ps1 script.
Locate the section where the docker compose build command is executed.
Modify the command to include the -f switch followed by the path to your custom Docker Compose file. For example:
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: