-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Issue with location of Dockerfile when using template #34
Comments
From @seancpeters on June 5, 2018 23:54 Could you post some info on the directory structure of your template source, including:
The existence or lack of a file extension shouldn't affect the output location of any files. |
From @LeighF51 on June 6, 2018 7:16 In the source the dockerfile can be found at the root of the service template project i.e. C:\Users\fyfieldl\source\Templates\ServiceTemplate\NetCore\NetCoreServiceTemplate - from here I have the dockerfile, csproj etc This structure for the docker file can also be seen in the template in the solution view The template.json file is stored one directory up from the service template itself (as it's a multi project template) inside the .template.config folder Hope this is enough info |
From @seancpeters on June 8, 2018 21:26 @LeighF51 - I'm going to need to play with a copy of your template to figure out what's going on. Is the template source in a repo where I can download it? Also, are you invoking this template only from VS, or also using "dotnet new"? |
From @LeighF51 on June 11, 2018 9:50 You can find a version of the template at https://github.com/LeighF51/ServiceTemplate Only invoking the template from VS, not using dotnet new at all |
Taking a look at the nupkg generated when building the solution in the repo, it looks like the docker file is being placed at a different location than expected. To get the behavior you expect, the file would need to be located at But it's actually located here instead It looks like this is being done as part of the SideWaffle build process (nothing's jumping out as being a customization that'd have this effect), I'll move this issue to that repo. |
I'm encountering this same problem. Seems to be because |
my Dockerfile doesn't copy to template
3)hide the parameter in dotnetcli.host.json or ide.host.json |
From @LeighF51 on June 5, 2018 15:59
Hi,
I have a template with 3 projects (one of them being a docker project) that are setup in a template. When creating a new solution from the template the docker file in my service project is included but it is stored away in a set of folders rather than being left at the root of the project it should be part of.
I've tried including a copyOnly section in my template.json but it doesn't seem to work with the DockerFile.
As the image above shows the window on the left displays the path where the file gets stored when creating a solution using the template and the one on the right shows the root of the project where the dockerfile should be based on the location it was at in the template.
I'm not sure if the issue with the dockerfile being stored elsewhere is due to it not having an extension?
Is there a way of me controlling where this file gets stored to in the projects generated from a template?
Copied from original issue: dotnet/templating#1551
The text was updated successfully, but these errors were encountered: