dotnet / aspnetcore Public
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
Enable docker feature for SPA templates #5417
Comments
I've been having a great deal of trouble getting docker to work with the version of the ANgular SPA package that uses angular 4.2.5. I would love for this to just work. |
@zippy1981 I've made some docker images that works well with angular SPA that uses angular@6, hope this can help you: https://hub.docker.com/r/zeekozhu/aspnetcore-build-yarn/tags/ |
Hopefully @ZeekoZhu's suggestion above will give us clues about a good starting point for implementing this. Having discussed wth @Eilon, it's not yet decided whether this really goes in 2.2 Preview 1 or who would be doing the implementation work on it. So I'm going to unassign myself and hereby ping @mkArtakMSFT for this to be triaged. Also CC @danroth27 @DamianEdwards in case they have a view on the importance or not of this work item. |
We chatted about this and agreed this should be done for 2.2. |
Talked to @danroth27 offline regarding this and we're moving this out to a future release as we have not enough resources to handle this in the current milestone. |
Is the work here just to add this line to the spa templates, or is there more to this that I'm just not seeing? |
@glennc @lisaguthrie Can you guys provide some guidance on the work needed here? |
A reminder that I still need some clarification and guidance from @glennc and/or @lisaguthrie. |
More work required than just updating the template to support Docker. I ran a quick test creating an Angular project and then adding Docker support post-create (which is possible) and F5 failed. I'm guessing the Dockerfile needs to be updated to be Angular/React-aware and ensure all the right bits end up in the Docker image, but someone would need to look into this further to confirm. |
Which Dockerfile? As far as I can tell there are no Dockerfiles in the aspnet/Templating repo, even for projects which claim support. Is the work then to create DockerFiles for ALL the templates in this repo? If so @danroth27 and I need to have some discussions about what the goals of this work are, because it's likely much larger than what we thought. |
@glennc it's unclear what the requirements are on this issue. CC @mkArtakMSFT. |
Looks like I ran into this today. Using FROM microsoft/dotnet:2.2-sdk-alpine AS build
WORKDIR /app
COPY . .
RUN dotnet restore
RUN dotnet build
RUN dotnet publish -c Release -o /app/deploy
FROM microsoft/dotnet:2.2-aspnetcore-runtime-alpine AS runtime
ENV DOTNET_USE_POLLING_FILE_WATCHER=true
WORKDIR /app
EXPOSE 80
COPY --from=build /app/deploy ./
ENTRYPOINT ["dotnet", "api.dll"] |
There are a few ways a customer could do something the most likely 2 are:
Depending on your build pipeline and lots of other details there might be other options. But those 2 are the pure Docker way of doing it. For us the only real option is to generate a multi-stage Dockerfile that uses the Node images when node is required. However, the Dockerfile contents are not currently owned by us. They are generated by the Docker tooling team. We could probably add Dockerfiles that you could get on the commandline, and then use right-click to add support later. But getting the VS checkbox for Docker support to work requires more work with a different team. Either way, we don't currently have time for this in the 3.0 milestone so I am moving the issue out. However, we could do a blog post explaining to everyone how they can get this working today without template support. @danroth27 do you want to work on that with me? |
@glennc Sure |
any news on this? |
Anyone else found a solution for this? |
Closing as there are no plans to do this in the near future. |
Currently when you create a new Angular/React project, the Enable Docker support option is disabled because the template config doesn't declare support for that.
We should implement support for this. AFAIK it should be able to work the same way as other ASP.NET templates.
The text was updated successfully, but these errors were encountered: