I am getting following error:
"Specify a project or solution file. The current working directory does not contain a project or solution file."
While try to build the image and getting the shown in the image
Following image shows my docker commands.
Also the images shows the code which i am trying to build. It shows the structure of the code which is src folder and a solution file outside the src folder.
I strongly belive issue is solution file is not in src.
Please recommend what will be change in docker files to make a successfull build and push.
I also showing the deployment.yaml file which shows the steps of the build below image
name: test run
jobs:
- job: Job_1
displayName: Agent job 1
pool:
vmImage: ubuntu-18.04
steps:
- checkout: self
- task: Docker@0
displayName: Build an image
inputs:
azureSubscription: 'sc-abc'
azureContainerRegistry:
loginServer: acr.azurecr.io
id: "/subscriptions/4f76bb2f-c521-45d1-b311-xxxxxxxxxx/resourceGroups/eus-abc-rg/providers/Microsoft.ContainerRegistry/registries/acr"
imageName: acr.azurecr.io/ims-abc/dotnetapi:jp26052022v8
- task: Docker@0
displayName: Push an image
inputs:
azureSubscription: 'sc-abc'
azureContainerRegistry: '{"loginServer":"acr.azurecr.io", "id" : "/subscriptions/4f76bb2f-c521-45d1-b311-xxxxxxxxxx/resourceGroups/eus-icndp-rg/providers/Microsoft.ContainerRegistry/registries/acr"}'
action: Push an image
CodePudding user response:
Please move WORKDIR /APP
before COPY . .
so that in the directory, it can find the solution file.
You need to create the image in pipeline, then can publish the image to ACR. Please check link for your reference.