Skip to content
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

Closed
SteveSandersonMS opened this issue Apr 20, 2018 · 17 comments
Closed

Enable docker feature for SPA templates #5417

SteveSandersonMS opened this issue Apr 20, 2018 · 17 comments
Assignees
Labels
area-mvc blocked enhancement Needs: Spec
Milestone

Comments

@SteveSandersonMS
Copy link
Member

@SteveSandersonMS SteveSandersonMS commented Apr 20, 2018

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.

@SteveSandersonMS SteveSandersonMS changed the title Enable docker flag for SPA templates Enable docker feature for SPA templates Apr 20, 2018
@zippy1981
Copy link
Contributor

@zippy1981 zippy1981 commented Jul 2, 2018

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.

@ZeekoZhu
Copy link

@ZeekoZhu ZeekoZhu commented Jul 3, 2018

@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/

@SteveSandersonMS SteveSandersonMS removed their assignment Jul 25, 2018
@SteveSandersonMS
Copy link
Member Author

@SteveSandersonMS SteveSandersonMS commented Jul 25, 2018

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.

@danroth27
Copy link
Member

@danroth27 danroth27 commented Jul 26, 2018

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.

@mkArtakMSFT
Copy link
Contributor

@mkArtakMSFT mkArtakMSFT commented Sep 21, 2018

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.

@ryanbrandenburg
Copy link
Member

@ryanbrandenburg ryanbrandenburg commented Oct 29, 2018

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?

@danroth27
Copy link
Member

@danroth27 danroth27 commented Oct 30, 2018

@glennc @lisaguthrie Can you guys provide some guidance on the work needed here?

@ryanbrandenburg
Copy link
Member

@ryanbrandenburg ryanbrandenburg commented Nov 8, 2018

A reminder that I still need some clarification and guidance from @glennc and/or @lisaguthrie.

@lisaguthrie
Copy link

@lisaguthrie lisaguthrie commented Nov 8, 2018

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.

@ryanbrandenburg
Copy link
Member

@ryanbrandenburg ryanbrandenburg commented Nov 9, 2018

I'm guessing the Dockerfile needs to be updated to be Angular/React-aware

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.

@ryanbrandenburg
Copy link
Member

@ryanbrandenburg ryanbrandenburg commented Dec 10, 2018

@glennc it's unclear what the requirements are on this issue.

CC @mkArtakMSFT.

@aspnet-hello aspnet-hello transferred this issue from aspnet/Templating Dec 17, 2018
@aspnet-hello aspnet-hello assigned glennc and unassigned glennc Dec 17, 2018
@aspnet-hello aspnet-hello added this to the 3.0.0-preview1 milestone Dec 17, 2018
@aspnet-hello aspnet-hello added 1 - Ready area-mvc blocked enhancement Needs: Spec labels Dec 17, 2018
@Eilon Eilon removed this from the 3.0.0-preview1 milestone Dec 18, 2018
@Eilon Eilon added this to the 3.0.0-preview2 milestone Dec 18, 2018
@mkArtakMSFT mkArtakMSFT removed this from the 3.0.0-preview2 milestone Jan 15, 2019
@mkArtakMSFT mkArtakMSFT added this to the 3.0.0-preview3 milestone Jan 15, 2019
@NotMyself
Copy link

@NotMyself NotMyself commented Jan 22, 2019

Looks like I ran into this today. Using dotnet new react and attempting to use the following Dockerfile fails with no support for NPM.

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"]

@glennc
Copy link
Contributor

@glennc glennc commented Feb 15, 2019

There are a few ways a customer could do something the most likely 2 are:

  1. Use multi-stage build so that actions requiring node happen in their own image, separate to the .NET compilation process. This assumes you don't need node at runtime and mostly need npm restore and trans-pile steps.
  2. Create your own build possibly runtime image that adds the version of node and other tools that you need.

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 glennc removed this from the 3.0.0-preview3 milestone Feb 15, 2019
@glennc glennc added this to the Backlog milestone Feb 15, 2019
@danroth27
Copy link
Member

@danroth27 danroth27 commented Feb 15, 2019

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

@ricardoasilva92
Copy link

@ricardoasilva92 ricardoasilva92 commented May 16, 2019

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?

@tiagomelobr
Copy link

@tiagomelobr tiagomelobr commented Jun 3, 2019

Anyone else found a solution for this?

@pranavkm pranavkm added the c label Aug 21, 2019
@danroth27 danroth27 removed the c label Aug 21, 2019
@danroth27 danroth27 removed this from the Backlog milestone Aug 21, 2019
@danroth27 danroth27 added this to the 5.0.0-preview1 milestone Aug 21, 2019
@mkArtakMSFT mkArtakMSFT removed this from the 5.0.0-preview1 milestone Jan 10, 2020
@mkArtakMSFT mkArtakMSFT added this to the next sprint planning milestone Jan 10, 2020
@mkArtakMSFT
Copy link
Contributor

@mkArtakMSFT mkArtakMSFT commented May 21, 2020

Closing as there are no plans to do this in the near future.

@msftbot msftbot bot locked as resolved and limited conversation to collaborators Jun 20, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-mvc blocked enhancement Needs: Spec
Projects
None yet
Development

No branches or pull requests