This issue cannot be reproduced on my desktop (Debian GNU/Linux 9.4 (stretch)/Docker 18.03.1-ce).
When running my Makefile on pipeline this command
docker build -t quay.io/greenpass/mytaggy-batch-billing:unstable-982f2ab -f MyTaggy.Batch.Billing/Dockerfile MyTaggy.Batch.Billing/bin/Release/netcoreapp2.1/publish/
the pipeline returns the following error:
unable to prepare context: the Dockerfile (/opt/atlassian/pipelines/agent/build/MyTaggy.Batch.Billing/Dockerfile) must be within the build context make: *** [mytaggy-batch-billing] Error 1 Makefile:14: recipe for target 'mytaggy-batch-billing' failed
Is there any way to update the docker service version (I am unable to run a custom docker service since --privileged is disabled) to solve this issue? I really don't want to copy the Dockerfile to the build context folder before this command.