comparison docker/base/Dockerfile @ 80:686a8c982c3f

docker: updated Dockerfiles: - use HTTPS URLs instead of HTTP - prosody image know use prosody Debian repository instead of Debian Jessie version, prosody 0.10 is used - prosody configuration is now in prosody directory next to Dockerfile, instead of using difficult to maintain sed calls - community modules are downloaded from mercurial, and only needed ones are kept - no more remote-roster hack \o/ - pubsub component is not at pubsub.[domain] (was sat-pubsub before) - SàT media are gotten from hg instead of ftp, so they are up-to-date with SàT version - libervia image now use pip for txJSON-RPC - fixed now needed jinja2 installation - fixed libervia/admin accounts auto-creation script - fixed uid/gid for prosody in data image - removed not needed anymore nox option in base image - added python-pip in base image - docker images now work with current dev version (0.6.0D)
author Goffi <goffi@goffi.org>
date Fri, 12 Feb 2016 20:24:24 +0100
parents 0e78c8a4626e
children 8dd32aa49614
comparison
equal deleted inserted replaced
79:694fd34ff0b3 80:686a8c982c3f
16 16
17 ENV DEBIAN_FRONTEND noninteractive 17 ENV DEBIAN_FRONTEND noninteractive
18 18
19 RUN apt-get update 19 RUN apt-get update
20 RUN apt-get upgrade -y 20 RUN apt-get upgrade -y
21 RUN apt-get install -y --no-install-recommends locales dbus-x11 python python-gobject-2 python-dbus python-lxml python-mutagen python-pil python-crypto python-feed python-potr python-twisted-core python-twisted-mail python-twisted-web python-twisted-words python-wokkel python-xdg python-xe python-zope.interface python-gi python-urwid python-markdown python-html2text mercurial 21 RUN apt-get install -y --no-install-recommends locales dbus-x11 python python-gobject-2 python-dbus python-lxml python-mutagen python-pil python-crypto python-feed python-potr python-twisted-core python-twisted-mail python-twisted-web python-twisted-words python-wokkel python-xdg python-xe python-zope.interface python-gi python-urwid python-markdown python-html2text mercurial python-pip
22 RUN apt-get clean 22 RUN apt-get clean
23 23
24 # we need UTF-8 locale 24 # we need UTF-8 locale
25 RUN sed -i "s/# en_US.UTF-8/en_US.UTF-8/" /etc/locale.gen 25 RUN sed -i "s/# en_US.UTF-8/en_US.UTF-8/" /etc/locale.gen
26 RUN locale-gen 26 RUN locale-gen
36 # URWID SÀTEXT # 36 # URWID SÀTEXT #
37 ################ 37 ################
38 38
39 WORKDIR /tmp 39 WORKDIR /tmp
40 40
41 RUN hg clone http://repos.goffi.org/urwid-satext 41 RUN hg clone https://repos.goffi.org/urwid-satext
42 42
43 WORKDIR urwid-satext 43 WORKDIR urwid-satext
44 44
45 RUN python setup.py install --prefix /usr --install-lib /usr/lib/python2.7/dist-packages 45 RUN python setup.py install --prefix /usr --install-lib /usr/lib/python2.7/dist-packages
46 46
52 # CORE INSTALLATION # 52 # CORE INSTALLATION #
53 ##################### 53 #####################
54 54
55 WORKDIR /tmp 55 WORKDIR /tmp
56 56
57 RUN hg clone http://repos.goffi.org/sat 57 RUN hg clone https://repos.goffi.org/sat
58 58
59 WORKDIR sat 59 WORKDIR sat
60 60
61 RUN SAT_INSTALL=nox python setup.py install --prefix /usr --install-lib /usr/lib/python2.7/dist-packages 61 RUN python setup.py install --prefix /usr --install-lib /usr/lib/python2.7/dist-packages
62 62
63 WORKDIR /tmp 63 WORKDIR /tmp
64 64
65 RUN rm -rf sat 65 RUN rm -rf sat
66 66
72 72
73 # we auto-create libervia account if it doesn't exists in Libervia container 73 # we auto-create libervia account if it doesn't exists in Libervia container
74 # so we remove it from reserved_list in plugin account 74 # so we remove it from reserved_list in plugin account
75 RUN echo '[plugin account]\nreserved_list=' >> /etc/sat.conf 75 RUN echo '[plugin account]\nreserved_list=' >> /etc/sat.conf
76 76
77 # This script set account domain in sat.conf is not already set 77 # This script set account domain in sat.conf if not already set
78 # if not set, domain is gotted from prosody container or DOMAIN environment variable 78 # if not set, domain is got from prosody container or DOMAIN environment variable
79 RUN echo '#!/usr/bin/env python2\n\ 79 RUN echo '#!/usr/bin/env python2\n\
80 import os, xmlrpclib, ConfigParser, socket, subprocess\n\ 80 import os, xmlrpclib, ConfigParser, socket, subprocess\n\
81 from sat.core.constants import Const as C\n\ 81 from sat.core.constants import Const as C\n\
82 from sat.tools import config as sat_config\n\ 82 from sat.tools import config as sat_config\n\
83 SECTION = "plugin account"\n\ 83 SECTION = "plugin account"\n\
106 config.set(SECTION, OPTION, domain)\n\ 106 config.set(SECTION, OPTION, domain)\n\
107 config.write(open(CONFIG_PATH, "w"))\n\ 107 config.write(open(CONFIG_PATH, "w"))\n\
108 subprocess.call(["add_host", domain, "prosody"])\n\ 108 subprocess.call(["add_host", domain, "prosody"])\n\
109 ' > /usr/local/bin/set_account_domain && chmod 0555 /usr/local/bin/set_account_domain 109 ' > /usr/local/bin/set_account_domain && chmod 0555 /usr/local/bin/set_account_domain
110 110
111 # account domain is set, then sat is launcher with D-Bus activated 111 # account domain is set, then sat is launched with D-Bus activated
112 RUN echo '#!/bin/sh\n\ 112 RUN echo '#!/bin/sh\n\
113 chmod a+w /etc/hosts\n\ 113 chmod a+w /etc/hosts\n\
114 su -c "set_account_domain && dbus-launch /usr/bin/sat $@" sat\n\ 114 su -c "set_account_domain && dbus-launch /usr/bin/sat $@" sat\n\
115 '> /usr/local/bin/sat && chmod 0500 /usr/local/bin/sat 115 '> /usr/local/bin/sat && chmod 0500 /usr/local/bin/sat
116 116