Closed johnjelinek closed 8 years ago
accompanying blog post: https://www.johnjelinek.com/2015/02/24/introducing-the-pushpin-dockerfile/#header
This is great to see. Thanks, John.
yw, feel free to move the Dockerfile into this repo if it is better suited here.
Hey John!
You might update the Dockerfile for Pushpin 1.1.0 which was released recently and changes the location of the default config. Instead of copying the three files from the config directory to the base directory, the standard practice now is to copy the examples/config directory to the base directory:
cp -r examples/config .
Also, it may be wise to checkout the v1.1.0 tag rather than the master branch, so that future commits can't break the Dockerfile.
:+1: Updated.
Hi I'm trying to update @johnjelinek Dockerfile to newer version of Pushpin (1.6.0) but it fail, not at docker build, only at /.pushpin execution.
# Pull the base image
FROM ubuntu:15.04
MAINTAINER Jorge Cuesta <jcuesta@okkralabs.com>
# Install dependencies
RUN apt-get -qq update
RUN apt-get -qqy install pkg-config
RUN apt-get -qqy install libqt4-dev libqca2-dev libqca2-plugin-ossl libqjson-dev
RUN apt-get -qqy install libzmq3-dev
RUN apt-get -qqy install python-zmq
RUN apt-get -qqy install python-setproctitle
RUN apt-get -qqy install python-jinja2
RUN apt-get -qqy install python-tnetstring
RUN apt-get -qqy install mongrel2-core
RUN apt-get -qqy install zurl
RUN apt-get -qqy install git
# Build Pushpin
RUN \
mkdir -p /pushpin && \
git clone git://github.com/fanout/pushpin.git /pushpin && \
cd /pushpin && \
git submodule init && git submodule update && \
make
# Configure Pushpin
RUN \
cd /pushpin && \
cp examples/config/* . && \
sed -i -e 's/localhost:80/app:8000/' routes && \
sed -i -e 's/push_in_http_addr=127.0.0.1/push_in_http_addr=0.0.0.0/' pushpin.conf
# Cleanup
RUN \
apt-get clean && \
rm -fr /var/lib/apt/lists/* && \
rm -fr /tmp/*
# Define working directory
WORKDIR /pushpin
# Define default command
CMD ["/pushpin/pushpin"]
# Expose ports.
# - 7999: HTTP port to forward on to the app
# - 5561: HTTP port to receive real-time messages to update in the app
EXPOSE 7999
EXPOSE 5561
Follow attach error give when try to run pushpin:
root@default:/pushpin# ./pushpin --verbose
Mon, 26 Oct 2015 18:23:04 GMT [ERROR] (errno: No such file or directory) getlogin failed and no LOGNAME env variable, how'd you do that?
starting...
starting mongrel2 (http:7999)
starting m2adapter
starting zurl
starting pushpin-proxy
starting pushpin-handler
started
Traceback (most recent call last):
File "./pushpin", line 60, in <module>
runner.run(exedir, config_file, verbose)
File "/pushpin/runner/runner.py", line 113, in run
p.wait()
File "/pushpin/runner/processmanager.py", line 90, in wait
p.check()
File "/pushpin/runner/processmanager.py", line 41, in check
raise RuntimeError("process exited unexpectedly: %s" % self.name)
RuntimeError: process exited unexpectedly: pushpin-handler
I really don't know what can be happen here and like you can see I use --verbose but prints doesn't look different.
Regards,
I'll take a look at this :)
On Mon, Oct 26, 2015 at 1:30 PM, Jorge Cuesta notifications@github.com wrote:
Hi I'm trying to update @johnjelinek https://github.com/johnjelinek Dockerfile to newer version of Pushpin (1.6.0) but it fail, not at docker build, only at /.pushpin execution.
Pull the base image
FROM ubuntu:15.04 MAINTAINER Jorge Cuesta jcuesta@okkralabs.com
Install dependencies
RUN apt-get -qq update RUN apt-get -qqy install pkg-config RUN apt-get -qqy install libqt4-dev libqca2-dev libqca2-plugin-ossl libqjson-dev RUN apt-get -qqy install libzmq3-dev RUN apt-get -qqy install python-zmq RUN apt-get -qqy install python-setproctitle RUN apt-get -qqy install python-jinja2 RUN apt-get -qqy install python-tnetstring RUN apt-get -qqy install mongrel2-core RUN apt-get -qqy install zurl RUN apt-get -qqy install git
Build Pushpin
RUN \ mkdir -p /pushpin && \ git clone git://github.com/fanout/pushpin.git /pushpin && \ cd /pushpin && \ git submodule init && git submodule update && \ make
Configure Pushpin
RUN \ cd /pushpin && \ cp examples/config/* . && \ sed -i -e 's/localhost:80/app:8000/' routes && \ sed -i -e 's/push_in_http_addr=127.0.0.1/push_in_http_addr=0.0.0.0/' pushpin.conf
Cleanup
RUN \ apt-get clean && \ rm -fr /var/lib/apt/lists/* && \ rm -fr /tmp/*
Define working directory
WORKDIR /pushpin
Define default command
CMD ["/pushpin/pushpin"]
Expose ports.
- 7999: HTTP port to forward on to the app
- 5561: HTTP port to receive real-time messages to update in the app
EXPOSE 7999 EXPOSE 5561
Follow attach error give when try to run pushpin:
root@default:/pushpin# ./pushpin --verbose Mon, 26 Oct 2015 18:23:04 GMT [ERROR](errno: No such file or directory) getlogin failed and no LOGNAME env variable, how'd you do that? starting... starting mongrel2 (http:7999) starting m2adapter starting zurl starting pushpin-proxy starting pushpin-handler started Traceback (most recent call last): File "./pushpin", line 60, in
runner.run(exedir, config_file, verbose) File "/pushpin/runner/runner.py", line 113, in run p.wait() File "/pushpin/runner/processmanager.py", line 90, in wait p.check() File "/pushpin/runner/processmanager.py", line 41, in check raise RuntimeError("process exited unexpectedly: %s" % self.name) RuntimeError: process exited unexpectedly: pushpin-handler I really don't know what can be happen here and like you can see I use --verbose but prints doesn't look different.
Regards,
— Reply to this email directly or view it on GitHub https://github.com/fanout/pushpin/issues/47223#issuecomment-151239885.
From the looks of it, you probably need to install python-blist. For more info, run the handler directly:
handler/pushpin-handler --config=pushpin.conf --verbose
Thanks I'll looking it in few hours and leave you know. Thanks again.
-----Mensaje original----- De: "Justin Karneges" notifications@github.com Enviado el: 26/10/2015 03:35 p.m. Para: "fanout/pushpin" pushpin@noreply.github.com CC: "Jorge Cuesta" jcuesta@okkralabs.com Asunto: Re: [pushpin] Dockerfile (#47223)
From the looks of it, you probably need to install python-blist. For more info, run the handler directly: handler/pushpin-handler --config=pushpin.conf --verbose — Reply to this email directly or view it on GitHub.
I've upgraded the Dockerfile to work with Pushpin 1.6.0. Please let me know if you run into any problems.
Thanks, --John Jelinek IV
On Mon, Oct 26, 2015 at 2:31 PM, Jorge Cuesta notifications@github.com wrote:
Thanks I'll looking it in few hours and leave you know. Thanks again.
-----Mensaje original----- De: "Justin Karneges" notifications@github.com Enviado el: 26/10/2015 03:35 p.m. Para: "fanout/pushpin" pushpin@noreply.github.com CC: "Jorge Cuesta" jcuesta@okkralabs.com Asunto: Re: [pushpin] Dockerfile (#47223)
From the looks of it, you probably need to install python-blist. For more info, run the handler directly: handler/pushpin-handler --config=pushpin.conf --verbose — Reply to this email directly or view it on GitHub.
— Reply to this email directly or view it on GitHub https://github.com/fanout/pushpin/issues/47223#issuecomment-151258582.
Cool, I see the update uses sortedcontainers instead of blist. Good timing, that works since Ubuntu 15.10 which was released 4 days ago. :)
Thanks @johnjelinek !!! You're the best!
FYI 1.7.0 was released, which includes a rewrite of the remaining server engine code from Python to C++. As a result, the python-sortedcontainers package is no longer needed.
The pushpin
(aka the runner) and pushpin-publish
programs are still written in Python and so the other Python dependencies are still needed.
Would it be helpful to merge the Dockerfile into this repo? I may be able to make updates to the Dockerfile later tonight.
I'm on the fence about whether this belongs in the Pushpin repo or separate. Are there any notable examples of projects that keep a Dockerfile in their main repo?
If we include it, what we'd probably want to do is not tie it to a release. So it could be kept in the master branch as a convenience, but excluded from all other branches and tarball releases. This would mean it could also be edited at any time, without regard to Pushpin's own release schedule.
I've decided to put this in a separate repository: https://github.com/fanout/docker-pushpin
This way we avoid shipping frozen Dockerfiles. I noticed our friends at Mashape do the same with Kong (they have separate docker-kong repo).
The only difference between your repo and the new one is that I changed the URL at the top of the Dockerfile, and I also put your name in the LICENSE file rather than Docker (I suspect you originally did this by accident as I see in another of your docker repos you use your name). You're still listed as the maintainer and I've given you access to the repo so you're able to continue if you wish.
Let me know if all's well and we can close this issue. Thanks!
LGTM, sorry I've been dragging my feet up upgrading the Dockerfile. I'll submit a PR if you don't get to it first.
Great, thanks!
FYI: I made a Dockerfile to build pushpin containers: https://github.com/johnjelinek/pushpin-docker