-
Notifications
You must be signed in to change notification settings - Fork 12k
WIP feat(docker): Docker build and deploy #885
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
Conversation
@cgmartin Great work especially on the design proposal. Do you have any plans on implementing this? I tried having an image with the latest angular-cli version running in it. However it seems a little fragile with respect to permissions. I've seen that you investigated in this area. Did you have success with running angular-cli in a container? |
@suchja There's been a good bit of changes this year with Docker Native for Mac/Win that I hoped would settle, but in all honesty, other priorities got the best of me over the past few months. Its on my list to come back to, but I don't have an ETA. Don't let me hold up other contributions if others are able. I'm considering reducing the scope for an initial PR from what is listed in the design proposal to only include When I tested the Dockerfile in the PR at the time with angular-cli, it worked. I assume it should still. Very simple nginx base image - not much to it: configure nginx and copy angular dist into the image. Requires that you build the app artifacts ( |
Ah, sorry, re-read your note. My original intent here was a deployable production image of the app artifact. I didn't have plans for an angular-cli development environment container. Has traditionally been tricky for Node.js apps with permissions that you mentioned, among other things (file watchers, npm installs). Docker Native might improve things? I personally favor vagrant/VM images for that use-case of shared Node.js development environments for the moment. |
Hi @cgmartin, if you need help on this, i would like to offer my support! Greetings Dope |
@TheDonDope seems like currently @cgmartin has not much time for this. In general I'm willing to spend some time on this, but this is also limited. Additionally it should be clear into which direction the docker support is going. So in case you like to work with me on this just send me a note. I did start with a really basic support. You can have a look here. There is an automated build on docker hub as well. Currently I'm updating to the latest version. |
Hey @suchja, sorry for my late reply. I had a look at your basic support, looks like a solid start to me :) My specific interest is in the deploy-for-production part. As @cgmartin mentioned in the comments of his design doc, some people might want to do a production build with This is a setup i also want to use in a personal project of mine: https://github.com/TheDonDope/crudular However i am currently struggling with the correct nginx configuration to support Do you have any experience with it? I will push a work-in-progress branch later this week and keep you updated. Greetings |
@suchja Here is my initial work: TheDonDope/crudular#1 |
@suchja I now have implemented a nginx production docker build, you can have a look here: https://github.com/TheDonDope/crudular. I added a description in the README on how the containers are setup and to be used: https://github.com/TheDonDope/crudular#dockerization |
@TheDonDope sorry for not coming back on this! I see your improvements on your local project (although I'm missing a bit of a general description what's the intention and goal of your project). With respect to docker and angular-cli it looks promising, but correct me if I'm wrong there are currently no enhancements done in angular-cli, or? Probably I'm just not clear on what exactly your goal is. In case you think about adding some of your work to angular-cli it would be good to create a short design proposal stating your use case and solution ideas? While getting more experience in my projects with angular-cli, I do see the personal need to have docker support for development in angular-cli. My two step approach (having 2 Dockerfiles which need to be copied) is a bit messy ;-). Guess it should be easy to extend angular-cli to generate the "second" Dockerfile as part of "ng new". However, I do not have looked into this by now. |
@cgmartin Would you mind if I start doing some work on this, I have the same use case for our internal projects where we depend heavily in the cli deploying it with nginx on docker. |
This is way too stale and we won't support it for 1.0 final. I'm going to close it and we will review when we support different deploy options. |
Any plans for bringing this up? Everyone is using Docker for deployment and is duplicating the efforts. How about we just support |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
DO NOT MERGE
This is a work-in-progress implementation of the Docker deploy design.
ng docker:init
- Initializes settings and files for building and deploying to a Docker environment.ng docker:push
- Builds and pushes a Docker image of the built ng app.ng docker:deploy
- Deploys ng app containers to a Docker Machine environment.