From 88f46fbe909cf4e97e198ee9fc2bfea9cc5f62a5 2015-11-26 14:08:28 From: Jan Kaluza Date: 2015-11-26 14:08:28 Subject: [PATCH] Better run.sh for Docker image --- diff --git a/Dockerfile b/Dockerfile index f9309ef6d1fa6642f540ba67e4f1553df2c51d41..7953062337ab5fc70561a71aa2c7cb9d6db758a5 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,13 +4,13 @@ EXPOSE 5222 VOLUME ["/etc/spectrum2/transports", "/var/lib/spectrum2"] RUN dnf install protobuf protobuf swiften gcc gcc-c++ make libpqxx-devel libpurple-devel protobuf-devel swiften-devel rpm-build avahi-devel boost-devel cmake cppunit-devel expat-devel libcommuni-devel libidn-devel libsqlite3x-devel log4cxx-devel mysql-devel popt-devel git libevent-devel qt-devel dbus-glib-devel libcurl-devel -y && \ - git clone git://github.com/hanzz/libtransport.git && \ - cd libtransport && \ + git clone git://github.com/hanzz/spectrum2.git && \ + cd spectrum2 && \ ./packaging/fedora/build_rpm.sh && \ rpm -U /root/rpmbuild/RPMS/x86_64/*.rpm && \ cp ./packaging/docker/run.sh /run.sh && \ cd .. && \ - rm -rf libtransport && \ + rm -rf spectrum2 && \ rm -rf ~/rpmbuild && \ rm -rf /usr/share/locale/* && \ rm -rf /usr/share/doc/* && \ diff --git a/packaging/docker/run.sh b/packaging/docker/run.sh index c0d6967b259ba16d99823777c670f095b4a3b45f..17198c3a439a12b83f2e8b2cbb98bd9ff6522f72 100755 --- a/packaging/docker/run.sh +++ b/packaging/docker/run.sh @@ -1,9 +1,11 @@ #!/bin/bash -spectrum2_manager start - while : do + echo "Trying to start Spectrum 2 instances." + echo "You should mount the directory with configuration files to /etc/spectrum2/transports/." + echo "Check the http://spectrum.im/documentation for more information." + spectrum2_manager start + tail -f /var/log/spectrum2/*/* 2>/dev/null sleep 2 - tail -f /var/log/spectrum2/*/* /var/log/spectrum2/*/*/* done