-
-
Notifications
You must be signed in to change notification settings - Fork 7.6k
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
Attempting to create Dockerfile, running into issues #29
Comments
I've been trying to use the distributed FROM ubuntu:14.04
ENV ZULIP_VERSION=1.3.2
RUN apt-get update \
&& apt-get -y install wget python-six \
&& wget --output-document /tmp/zulip.tar.gz https://www.zulip.com/dist/releases/zulip-server-${ZULIP_VERSION}.tar.gz \
&& cd /root \
&& tar zxvf /tmp/zulip.tar.gz \
&& rm /tmp/zulip.tar.gz \
&& mv zulip-server-${ZULIP_VERSION} zulip \
&& cd /root/zulip \
&& ./scripts/setup/install \
&& su zulip -c /home/zulip/deployments/current/scripts/setup/initialize-database But the RabbitMQ server fails to start. Even running the commands in an |
Hmm, that sounds like a docker/rabbitmq compatibility issue; it might be worth seeing how docker packages for rabbitmq work. The only things the Zulip install process does to configure rabbitmq that could cause it to not start is install puppet/zulip/files/rabbitmq/rabbitmq.config into the right place in /etc... |
I've tried the tar.gz too, and run like @mikew into the RabbitMQ issue. Here's the Dockerfile up to now: FROM phusion/baseimage
RUN apt-get update && apt-get upgrade -y && apt-get install wget python-six
RUN curl https://www.zulip.com/dist/releases/zulip-server-1.3.5.tar.gz | tar xvz
RUN mv zulip-server-1.3.5 /root/zulip
RUN cd /root/zulip && ./scripts/setup/install
COPY settings.py /etc/zulip/
RUN su zulip -c /home/zulip/deployments/current/scripts/setup/initialize-database I'd also like to make more than one container out of this (e.g. one for postgres, one for redis, one for rabbitmq) - to end up with a nice docker-compose.yml file - but I feel it's a lot more work due to the complicated install/config process. @timabbott it also would be great to have a |
I can look at this a bit more after breakfast but: (1) latest.tar.gz should be easy to add. (2) timabbott@f2248d2 is what I needed to do in order to get Travis CI (based on docker) installing a development type environment, which may be helpful for debugging (e.g. I did have to run a rabbitmq restart in the middle of the install process there) |
I created a zulip-latest.tar.gz symlink in https://www.zulip.com/dist/releases/. Enjoy! |
Hi, I also want to use docker to deploy Zulip. But I don't know which ports should be exposed. Could you help me? |
My Dockerfile above has |
@blha303 but what are the ports in production? 80 and 443? |
https://groups.google.com/d/msg/zulip-devel/d2f2eJANtv4/JTnLkvJWBgAJ answers that I think |
@timabbott Yes, thank you. |
After call the
Though I want to make some efforts, but I am not quite good at reading the scripts. |
@njuaplusplus, to be clear, are you saying the install script is hanging? I've never heard of that happening before. Are you running in an environment with low resource (RAM, CPU, etc.) of some sort? |
@timabbott Yes, the install script is hanging. It's my fault that I didn't make it clear. I ran the install script in the dockerfile to build an image. The resource is a bit low as I use Linode VPS with 4GB RAM and 4 Cores CPU. Maybe this situation is same with @mikew as he said "manually trying /etc/init.d/rabbitmq-server start it just hangs there." |
That should be more than enough resources, so yeah I'd guess this is the
same problem @mikew had...
Seems worth looking at what dockerfiles for RabbitMQ on Ubuntu Trusty do --
this can't be a problem unique to Zulip.
|
#18 is this +1 |
If anyone here is curious, it is possible to get Zulip working in a container. ;)
A bit of self advertising of my Galexrt/docker-zulip repo, but I hope it helps someone here. :) |
👍 |
Cool thanks for posting your work @galexrt ! I'd be interested in getting a working sample Dockerfile into the main Zulip repository if we can figure out a good way to do it... |
@timabbott Where shall I put the Dockerfile? BTW since my first post here, I added a bunch of new features to the image, for example user creation(without the need of an smtp server) (Currently some features like log2zulip configuration, automatic backup of the database, backup creation and restoration are in the dev branch only, but should be ready by tomorrow to be pushed to the master branch). P.S. I just submitted the Dropbox Contributor License Agreement, so I would be ready to create a pull request now. |
@galexrt I think putting it under a new top-level directory docker/ is reasonable but try to avoid using relative paths that would make moving it somewhere else later a pain. A pull request with the needed files would be great; it'd be awesome if you could clean it up a bit to avoid creating duplicated content where we can (e.g. I notice in your repo you have a fork of the Zulip puppet config; ideally we'd figure out a solution that doesn't require updating things in 2 places whenever we make config changes...) |
@timabbott I had to fork them, because the zulip/zulip puppet manifests install a lot of unneeded stuff in the container. But I have to insist on using my modified manifests, because they are the ones that make up the smallness of the image. |
@galexrt OK that's reasonable; I think we will want to refactor so those unnecessary-in-docker items like NTP config are just optional in the config (or a separate optional manifest), but we can start with copying them in. |
@timabbott If it's okay, I'm going to create the pull request now. Shall I include deployment files for |
Sounds good! Let's leave off the kubernetes/docker-compose stuff for now but I think once we get the main stuff merged it looks like it'd be easy for me to setup automated image building off of Zulip releases and point to that? I'm not super familiar with the docker ecosystem but it looks like quay.io is free for open source projects... |
@timabbott Yes, quay.io should be free for open source projects
|
@timabbott Sorry for the delay. I had to first finish my clean up (zulip/docker-zulip#31). Also you said that I should leave off the docker-compose stuff, I have added a basic
The |
awesome! I've delayed my initial dev environment to start learning about Zulip's frontend and contribute thereafter as it's quite a pain to install it. Will give it a try next week. Tks for that @galexrt |
Add nodejs-legacy instruction to README.md.
This installs all dependencies, but services (e.g rabbitmq) don't appear to start, so later parts of provision.py (i.e
sh.configure_rabbitmq(**LOUD)
) fail. Also emoji generation seems to be failing too, due to a missing dependency. I'm burned out from working on this, if anyone else can offer a suggestion it would be appreciated.The text was updated successfully, but these errors were encountered: