How to run Skaffold with a bootstrapped .NET Core API Docker project?
In Skaffold, the artifact context
(sometimes called the workspace) is the working directory when building the artifact. For Docker-based artifacts (the default artifact type), the artifact context is the root of the Docker build context and the Dockerfile
in the root of the artifact's context. You can specify an alternative Dockerfile location but it must live within the artifact context.
Normally skaffold init
will create a skaffold.yaml
where the artifact context is the directory containing a Dockerfile
. So if I understand your situation, I think you normally run your docker build -f Dockerfile ..
in src/Microservices/TestMicro
. So you should be able to also run your docker build
via:
C:> cd ...\src\MicroservicesC:> docker build -f TestMicro\Dockerfile .`
So you need to change your artifact definition to the following:
build: artifacts: - image: testmicro context: src/Microservices docker: dockerfile: TestMicro/Dockerfile