Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

247
Views
Specifying Dockefile Path in Azure Pipelines

We are trying to use Azure Pipelines to build Docker image for a Dot Net Core App. When setting up the pipeline if I check "default build context" will it automatically pick the Dockerfile from my root directory?

Dockerfile is currently in the root directory but I want to move the Dockerfile inside the api project. How do I setup the pipeline so the docker build command is executed from root directory but refer to Dockerfile inside the project?

enter image description here

over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

I haven't tried this, but something like this should work:

- task: Docker@1
  inputs:
    containerregistrytype: 'Container Registry'
    dockerRegistryEndpoint: my_service_connection
    imageName: bla-bla-bla
    dockerFile: src/app/dockerfile
    buildContext: $(Build.Repository.LocalPath)

https://docs.microsoft.com/en-us/azure/devops/pipelines/tasks/build/docker?view=azure-devops#task-inputs

Version 2 of the task has support for setting build context:

enter image description here

over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!