-
Notifications
You must be signed in to change notification settings - Fork 272
Conversation
Building: docker build -t shout . Running: docker run --name shout -d --publish 9000:9000 shout
Thanks a lot for your contribution! :-) However, I'm not entirely sure this belongs to the shout repository itself. I feel like although it doesn't hurt to have community-driven documentations on ecosystems that integrate with Shout (deployment/configuration tools like Ansible, process managers like systemd or supervisor, ...), we should avoid to merge these with the main repo. Does that make sense to sysadmins and Docker experts around here? |
To be honest, from a deployment standpoint it is less pain to just put it in the main repo. |
Or create a new wget -O -- https://github.com/erming/shout/archive/${RELEASE}.tar.gz | tar -xvz - Seems a bit overkill though. Docker is very ubiquitous and from most standpoints having the |
Heck, this is still better here than nowhere, so why not. We can still move it to some place else later on anyway. Also, if you want to update the doc accordingly to this PR, the file to modify is here. |
There are already 10 different implementations of this. |
Not to mention my own dockerfile. |
Oh my, now that's a list, thanks @floogulinc! I'm considering closing that PR now that I see there are so many out there... |
I think it's good to have this stuff in official repos. Publishing it under the same username and repo name, as is standard with npm modules, would be good too. As for the |
Thanks for your input @williamboman. Fair enough, let's add a Dockerfile to this repo, but @bencevans, could you update your file according to @williamboman's comment and files from @floogulinc's list and @Xe's file please? |
Updated to erming#477 (comment) comment
@astorije I've updated the PR. I've already got a docker-shout, I opened this as it would make things simpler for deployments. |
@@ -0,0 +1,3 @@ | |||
FROM node:0.12-onbuild |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For the record, doc about this: https://github.com/docker-library/docs/tree/master/node#image-variants
Reading that doc, it sounds like we should be using node:<version>
instead. On that note, it's what your own Dockerfile says, any reason why you don't want to do that here too?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd prefer if we run without the -onbuild
tag - node:0.12
, or even node:4
(but wait until Monday for critical HTTP DoS fix).
@astorije What the -onbuild
tag indicates is that it will automatically do this;
WORKDIR /usr/src/app
ONBUILD COPY package.json /usr/src/app
ONBUILD RUN npm install
ONBUILD COPY . /usr/src/app
CMD ["npm", "start"]
What this essentially means is that it will take care of moving source files into the image, and making sure dependencies is installed when running the image. It also specifies a default command ($ npm start
) to be executed when running the image (this will be overridden by our ENTRYPOINT
).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The doc page says that it's good to go from 0 to Dockerized quickly but that we should not rely on that on the long run. I'm OK with onbuild
knowing that we might have to change in future if we want to have more control over the setup. But again, by that time this might have been moved to its own official repo.
Hey @bencevans, apart from my comment, it look good to me. Considering I'm no Docker expert, I compared with other links given by @floogulinc. Also, do you want to update http://shout-irc.com/docs/deployment/docker.html (through https://github.com/erming/shout-website/blob/gh-pages/_docs/deployment/docker.md) according to your PR? |
👍 @JocelynDelalande or @erming, may I have your second review on this please? I know none of you guys are Docker experts, but I think we should leave the community contribute to this accordingly. |
It will work. |
I have made a more correct dockerfile in Shuo-irc/Shuo#87. It includes things like "not running the daemon as root". |
@bencevans, what do you think of the suggestions @Xe made in Shuo-IRC/Shuo#87 for this current PR? |
What @Xe has looks pretty ace. AFK for a few days though so can't update |
No worries, update when you have time and I'll take another look so that we can merge. |
@astorije ready for another look. |
👍 |
all: Thanks for the crawling work among all those dockerfiles :) Just for the needs of the review, i started playing with docker, and I think this PR has a bug.
And in fact, the image node:4.0-onbuild seems not to be listed. Also @bencevans could you pull-request the documentation accordingly before we merge ? That's just so that we don't desynchronize documentation from actual code. |
That is an unrelated BTRFS issue. Can you recreate this from a fresh VM running CoreOS? |
@Xe Maybe, but I'm not 100% sure (although I'm very docker begginer) that it is a btrfs issue, @Xe do you agree me that node:4.0-onbuild is no longer available or is it just me misunderstanding docker-hub ?
I will if really required, but my time is limited, and that's again a new big thing to install/discover to test this PR... (for the record, I'm running Debian Jessie) |
$ git clone https://github.com/coreos/coreos-vagrant
$ cd coreos-vagrant
$ vagrant up && vagrant ssh
vm$ git clone https://path/to/forked/repo
vm$ docker build -t shout shout |
I gave a quick shot at @Xe's commands and I could complete them all, modulo a few extras (switch to right branch, git config to be able to pull, ...). I was able to start Shout from there (only once though, odd, but that coincides with my lack of Docker knowledge), but couldn't ping it. I didn't spent time on this, I just wanted to test if the Dockerfile was loudly failing or not. In regards to @JocelynDelalande's comment about Node version, looking at https://hub.docker.com/_/node/, I wonder if we should not specify |
@astorije that's just a matter of port forwarding to the VM, which is trivial. |
ah finally tested, thanks @Xe for the tip for testing using coreos, that was not simple, but I was finally able to test it :) So, well, that's all I can say as docker-ignorant : « it works », 👍 thanks @bencevans :)
For myself, I think that we should update… later, let's merge first :)
Yes, you are probably right. |
Building:
Running: