Mercurial > sat_docs
annotate docker/prosody/Dockerfile @ 112:a573bddf8039
docker (libervia_cont): put container used for maintenance in a variable
author | Goffi <goffi@goffi.org> |
---|---|
date | Mon, 29 Feb 2016 22:01:02 +0100 |
parents | 470dafe3f5b6 |
children |
rev | line source |
---|---|
21
0e78c8a4626e
Added Dockerfiles to create Docker images for easy installation + scripts to manages them. see README for details.
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
1 ############################################################### |
0e78c8a4626e
Added Dockerfiles to create Docker images for easy installation + scripts to manages them. see README for details.
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
2 # # |
0e78c8a4626e
Added Dockerfiles to create Docker images for easy installation + scripts to manages them. see README for details.
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
3 # Salut à Toi/Prosody # |
0e78c8a4626e
Added Dockerfiles to create Docker images for easy installation + scripts to manages them. see README for details.
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
4 # This Dockerfile build a Prosody version prepared for SàT # |
0e78c8a4626e
Added Dockerfiles to create Docker images for easy installation + scripts to manages them. see README for details.
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
5 # Salut à Toi is a multi-frontends multi-purposes XMPP client # |
0e78c8a4626e
Added Dockerfiles to create Docker images for easy installation + scripts to manages them. see README for details.
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
6 # # |
0e78c8a4626e
Added Dockerfiles to create Docker images for easy installation + scripts to manages them. see README for details.
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
7 ############################################################### |
0e78c8a4626e
Added Dockerfiles to create Docker images for easy installation + scripts to manages them. see README for details.
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
8 |
85
bcba1966e6db
docker: certificate generation + various improvments:
Goffi <goffi@goffi.org>
parents:
80
diff
changeset
|
9 FROM salutatoi/sat_pubsub:latest |
21
0e78c8a4626e
Added Dockerfiles to create Docker images for easy installation + scripts to manages them. see README for details.
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
10 |
0e78c8a4626e
Added Dockerfiles to create Docker images for easy installation + scripts to manages them. see README for details.
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
11 MAINTAINER Goffi <goffi@goffi.org> |
0e78c8a4626e
Added Dockerfiles to create Docker images for easy installation + scripts to manages them. see README for details.
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
12 |
105 | 13 ############################ |
14 # AUTOMATIC CONFIGURATION # | |
15 ############################ | |
16 | |
17 | |
18 COPY scripts/container_server scripts/prosody /usr/local/bin/ | |
19 RUN chown root:root /usr/local/bin/container_server && \ | |
20 chmod 0555 /usr/local/bin/container_server && \ | |
21 chown root:root /usr/local/bin/prosody && \ | |
22 chmod 0555 /usr/local/bin/prosody | |
23 | |
21
0e78c8a4626e
Added Dockerfiles to create Docker images for easy installation + scripts to manages them. see README for details.
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
24 ######## |
0e78c8a4626e
Added Dockerfiles to create Docker images for easy installation + scripts to manages them. see README for details.
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
25 # BASE # |
0e78c8a4626e
Added Dockerfiles to create Docker images for easy installation + scripts to manages them. see README for details.
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
26 ######## |
0e78c8a4626e
Added Dockerfiles to create Docker images for easy installation + scripts to manages them. see README for details.
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
27 |
105 | 28 RUN apt-get install -y --no-install-recommends lsb-release && \ |
29 | |
80 | 30 # we add prosody repository and key |
105 | 31 echo deb http://packages.prosody.im/debian $(lsb_release -sc) main > /etc/apt/sources.list.d/prosody.list && \ |
32 python -c 'import urllib2;import subprocess as s;s.Popen(["apt-key","add","-"], stdin=s.PIPE).communicate(urllib2.urlopen("https://prosody.im/files/prosody-debian-packages.key").read())' && \ | |
33 apt-get update && \ | |
34 | |
80 | 35 # and install prosody and apg (to generate passwords) |
107
470dafe3f5b6
docker (prosody): switched to prosody-trunk, as it is currently more stable than prosody-0.10
Goffi <goffi@goffi.org>
parents:
105
diff
changeset
|
36 apt-get install -y apg prosody-trunk && \ |
105 | 37 apt-get clean && \ |
38 | |
39 # prosody user need to access (and write) certificates | |
40 adduser prosody tls-cert && \ | |
41 | |
42 # prosody need to access /var/run to write it's pid | |
43 mkdir -p /var/run/prosody; chown prosody:adm /var/run/prosody | |
21
0e78c8a4626e
Added Dockerfiles to create Docker images for easy installation + scripts to manages them. see README for details.
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
44 |
80 | 45 ################### |
46 # PROSODY MODULES # | |
47 ################### | |
21
0e78c8a4626e
Added Dockerfiles to create Docker images for easy installation + scripts to manages them. see README for details.
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
48 |
105 | 49 RUN cd /tmp && \ |
50 hg clone https://hg.prosody.im/prosody-modules/ prosody-modules && \ | |
51 cd prosody-modules && \ | |
52 for mod in privilege delegation ipcheck http_upload;do cp mod_$mod/mod_$mod.lua /usr/lib/prosody/modules;done && \ | |
53 cd /tmp && rm -rf prosody-modules | |
21
0e78c8a4626e
Added Dockerfiles to create Docker images for easy installation + scripts to manages them. see README for details.
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
54 |
80 | 55 ################# |
56 # CONFIGURATION # | |
57 ################# | |
21
0e78c8a4626e
Added Dockerfiles to create Docker images for easy installation + scripts to manages them. see README for details.
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
58 |
105 | 59 ADD prosody.cfg.lua /etc/prosody/prosody_sat_cfg/ |
60 RUN cd /etc/prosody && chown -R prosody:prosody prosody_sat_cfg && \ | |
61 ln -fs prosody_sat_cfg/prosody.cfg.lua prosody.cfg.lua && \ | |
21
0e78c8a4626e
Added Dockerfiles to create Docker images for easy installation + scripts to manages them. see README for details.
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
62 |
0e78c8a4626e
Added Dockerfiles to create Docker images for easy installation + scripts to manages them. see README for details.
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
63 ############### |
0e78c8a4626e
Added Dockerfiles to create Docker images for easy installation + scripts to manages them. see README for details.
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
64 # CERTIFICATE # |
0e78c8a4626e
Added Dockerfiles to create Docker images for easy installation + scripts to manages them. see README for details.
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
65 ############### |
0e78c8a4626e
Added Dockerfiles to create Docker images for easy installation + scripts to manages them. see README for details.
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
66 |
85
bcba1966e6db
docker: certificate generation + various improvments:
Goffi <goffi@goffi.org>
parents:
80
diff
changeset
|
67 # We want to use the certificates in /usr/share/sat/certificates |
bcba1966e6db
docker: certificate generation + various improvments:
Goffi <goffi@goffi.org>
parents:
80
diff
changeset
|
68 # and we don't want any certificate in the image, |
bcba1966e6db
docker: certificate generation + various improvments:
Goffi <goffi@goffi.org>
parents:
80
diff
changeset
|
69 # they'll be generated at launch or mounted in container |
105 | 70 rm -rf /etc/localhost.key /etc/prosody/certs/* |
21
0e78c8a4626e
Added Dockerfiles to create Docker images for easy installation + scripts to manages them. see README for details.
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
71 |
0e78c8a4626e
Added Dockerfiles to create Docker images for easy installation + scripts to manages them. see README for details.
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
72 ######### |
0e78c8a4626e
Added Dockerfiles to create Docker images for easy installation + scripts to manages them. see README for details.
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
73 # PORTS # |
0e78c8a4626e
Added Dockerfiles to create Docker images for easy installation + scripts to manages them. see README for details.
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
74 ######### |
0e78c8a4626e
Added Dockerfiles to create Docker images for easy installation + scripts to manages them. see README for details.
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
75 |
105 | 76 # client to server (C2S), |
77 # server to server (S2S), | |
78 # HTTP upload, | |
79 # and HTTP upload (HTTPS) | |
80 EXPOSE 5222 5269 5280 5281 | |
91
30f3f83d6959
docker (prosody, libervia_cont): expose HTTP upload ports in Prosody image
Goffi <goffi@goffi.org>
parents:
85
diff
changeset
|
81 |
21
0e78c8a4626e
Added Dockerfiles to create Docker images for easy installation + scripts to manages them. see README for details.
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
82 ########## |
0e78c8a4626e
Added Dockerfiles to create Docker images for easy installation + scripts to manages them. see README for details.
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
83 # LAUNCH # |
0e78c8a4626e
Added Dockerfiles to create Docker images for easy installation + scripts to manages them. see README for details.
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
84 ########## |
0e78c8a4626e
Added Dockerfiles to create Docker images for easy installation + scripts to manages them. see README for details.
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
85 |
0e78c8a4626e
Added Dockerfiles to create Docker images for easy installation + scripts to manages them. see README for details.
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
86 USER prosody |
0e78c8a4626e
Added Dockerfiles to create Docker images for easy installation + scripts to manages them. see README for details.
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
87 |
0e78c8a4626e
Added Dockerfiles to create Docker images for easy installation + scripts to manages them. see README for details.
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
88 ENTRYPOINT ["prosody"] |