Azure / Azure/azure-functions-core-tools
func init --docker-only should support .NET Solutions
- Dominant language
- C#
- Stars
- 1.5k
- Forks
- 498
- Avg merge
- 4d 20h
- Merged PRs (30d)
- 14
Description
## Issue
When running
```sh
func init --docker-only --worker-runtime dotnet
```
against a csproj I get a dockerfile that only includes the current directory
## Outcome
```sh
docker build -t repo/image:tag .
```
Fails due to not being able to find dependent projects
## Impact
I can't generate dockerfiles as part of my CI / CD pipeline, which could be argued is a bad thing, but I like the idea of a function being "take my code and run it" and as long as the function runtime is there I don't care if it is running locally, in Azure Function or in KEDA.
## Expected outcome
When running
```sh
func init --docker-only --worker-runtime dotnet
```
It should include dependent projects into the dockerfile using "COPY" this will then allow for dependent projects to be included and also match the "Add docker support" at a project level in Visual Studio.
Contributor guide
Research direction
Start at the `func init --docker-only --worker-runtime dotnet` entry point and inspect how Dockerfiles are generated for a `.csproj`. Trace how dependent projects are identified, then verify that the generated Dockerfile includes them with `COPY` entries and that `docker build -t repo/image:tag .` can find those dependencies.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp, docker
- Domain
- cli, devops
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100