Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docker Compose Default Project Name Parameter Bug #16361

Closed
Dejulia489 opened this issue May 24, 2022 · 3 comments
Closed

Docker Compose Default Project Name Parameter Bug #16361

Dejulia489 opened this issue May 24, 2022 · 3 comments
Labels

Comments

@Dejulia489
Copy link

Dejulia489 commented May 24, 2022

Note

Issues in this repo are for tracking bugs, feature requests and questions for the tasks in this repo

For a list:
https://github.com/Microsoft/azure-pipelines-tasks/tree/master/Tasks

If you have an issue or request for the Azure Pipelines service, use developer community instead:

https://developercommunity.visualstudio.com/spaces/21/index.html )

Required Information

Entering this information will route you directly to the right team and expedite traction.

Question, Bug, or Feature?
Type: Bug

Enter Task Name: DockerCompose@0

list here (V# not needed):
https://github.com/Microsoft/azure-pipelines-tasks/tree/master/Tasks

Environment

  • Server - Azure Pipelines or TFS on-premises? Azure Pipelines

    • If using TFS on-premises, provide the version:

    • If using Azure Pipelines, provide the account name, team project name, build definition name/build number:

  • Agent - Hosted or Private: Hosted (Eventually) & Private

    • If using Hosted agent, provide agent queue name:

    • If using private agent, provide the OS of the machine running the agent and the agent version:

Issue Description

DockerCompose@0 projectName parameter default value will only work if the repository name is lowercase with Docker version 2.5.0

        {
            "name": "projectName",
            "type": "string",
            "label": "Project Name",
            "defaultValue": "$(Build.Repository.Name)",
            "helpMarkDown": "Project name used for default naming of images and containers."
        }, 

Task logs

[Enable debug logging and please provide the zip file containing all the logs for a speedy resolution]

Troubleshooting

Checkout how to troubleshoot failures and collect debug logs: https://docs.microsoft.com/en-us/vsts/build-release/actions/troubleshooting

Error logs

##[error]The process 'C:\Program Files\Docker\Docker\resources\bin\docker-compose.exe' failed with exit code 15

@Dejulia489
Copy link
Author

If you are working in yaml you can pass the following syntax to set the repository name to all lowercase.

steps:
- task: DockerCompose@0
  inputs:
    projectName: ${{ lower(variables['Build.Repository.Name']) }}

@github-actions
Copy link

This issue is stale because it has been open for 180 days with no activity. Remove the stale label or comment on the issue otherwise this will be closed in 5 days

@lakeman
Copy link

lakeman commented May 3, 2023

Yes you can work around this issue in a pipeline. But you shouldn't have to.
Can the default behaviour change to lower case, and stripping out other illegal characters?

In my case, no output from docker-compose was even captured in the build log. So it took half a day of debugging to understand the problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants