-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
feat(dist:Dockerfile): initial add dist Dockerfile #1639
Conversation
Further information This needs a docker hub entry which I created https://hub.docker.com/r/generatorangularfullstack/angular-fullstack-dist/ |
Would it instead make more sense to just keep the Dockerfile within this repo? Then we wouldn't have any issues with versioning and dependencies. |
I rebuilt the dockerfile repo to https://github.com/angular-fullstack/angular-fullstack-dockerfile but I can't change the docker hub repo to https://hub.docker.com/r/generatorangularfullstack/angular-fullstack-dist/ point to it as I'm not an admin on the github repo used to build it. I added @Awk34 as an admin in hub.docker and hopefully you can fix this problem, probably by deleting and recreating the repo. As for the dependencies, I was thinking there would be images built for every version released to avoid bit rot for apps built with older versions. This works by branching the source repo and adding it in in hub.docker https://hub.docker.com/r/generatorangularfullstack/angular-fullstack-dist/~/settings/automated-builds/ |
Referencing hub.docker.com can be problematic for several reasons. The way I use a dockerfile is still kind of a pain to use because during automated builds the npm/bower process needs to be run inside the container instead of simply copying in the modules. As you can see in the script: the npm install--production is run, however the bower modules are just automatically added, or something confusing like that. This dockerfile needs to be run from /dist after
I usually keep a Dockerfile like this in a project repo. It uses Alpine linux and therefore is pretty small. You can run docker-squash (https://github.com/jwilder/docker-squash) to get it even smaller if need be. Smallest I've gotten with my setup is ~82MB.
|
@JeremyMarshall sorry it's been so long. Do you have any time to revisit this? Perhaps respond to @macneib 's comments? |
You can't fault the tiny size with this approach. I think there could be room for different Dockerfiles. Possibly the approach is just to provide a standard node Dockerfile to get projects started @macneib is correct, the npm dependencies are a pain as they need to be rebuilt every time (hopefully from the cache) unless there is an intermediate image with them pre added |
You can also take a look at what #938 is doing |
I see you closed it. I was going to put docker compose in in a separate PR The point about the environment is to connect node to mongo inside the On Thu, May 12, 2016 at 11:39 PM, Andrew Koroluk [email protected]
|
Well, that old PR is quite outdated, and the original author won't be updating it, that's why It'd be great if you could do that stuff as well 😄 |
I've given you write access, so you can make a branch directly on this repo |
03e0dfa
to
70d3117
Compare
Closed to refactor with latest changes - seems I force pushed my repo from canary which was the one I did the original PR on. Will put it on a separate docker branch - I still have the changes on a different branch |
Add functionality to add Dockerfile to dist folder
in the same way as the heroku Procfile is created
No docker integration to build image
Closes #1531