annotate docker/sat_pubsub/Dockerfile @ 151:6f8c849daf2a

flatpak (build_manifest): updated org.freedesktop.Platform runtime version: manifests were using an old 1.6 version of the runtime, this patch fixes them by using the current 18.8 one. Thanks to that, the main_loop.patch which was made because of an outdated version of GLib (see https://github.com/flatpak/flatpak/issues/1899) is not needed anymore and has been removed. Some useless extensions have also been removed from default manifest.
author Goffi <goffi@goffi.org>
date Wed, 26 Jun 2019 20:49:31 +0200
parents d493fe1cf095
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
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/sat_pubsub #
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 SàT Pubsub service 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
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
9 FROM salutatoi/base:latest
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
b69056368901 docker: images optimisation:
Goffi <goffi@goffi.org>
parents: 83
diff changeset
13 ############################
b69056368901 docker: images optimisation:
Goffi <goffi@goffi.org>
parents: 83
diff changeset
14 # AUTOMATIC CONFIGURATION #
b69056368901 docker: images optimisation:
Goffi <goffi@goffi.org>
parents: 83
diff changeset
15 ############################
b69056368901 docker: images optimisation:
Goffi <goffi@goffi.org>
parents: 83
diff changeset
16
b69056368901 docker: images optimisation:
Goffi <goffi@goffi.org>
parents: 83
diff changeset
17
116
d0a5db5b9bdf docker: fixed bad stopping:
Goffi <goffi@goffi.org>
parents: 105
diff changeset
18 COPY scripts/sat_pubsub scripts/launch_postgres_and_pubsub.sh /usr/local/bin/
105
b69056368901 docker: images optimisation:
Goffi <goffi@goffi.org>
parents: 83
diff changeset
19 RUN chown root:root /usr/local/bin/sat_pubsub && \
b69056368901 docker: images optimisation:
Goffi <goffi@goffi.org>
parents: 83
diff changeset
20 chmod 0555 /usr/local/bin/sat_pubsub && \
116
d0a5db5b9bdf docker: fixed bad stopping:
Goffi <goffi@goffi.org>
parents: 105
diff changeset
21 chmod 0555 /usr/local/bin/launch_postgres_and_pubsub.sh && \
105
b69056368901 docker: images optimisation:
Goffi <goffi@goffi.org>
parents: 83
diff changeset
22
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
23 ########
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 # 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
25 ########
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
121
d493fe1cf095 docker (sat_pubsub): minor optimization by joining 2 apt-get install
Goffi <goffi@goffi.org>
parents: 116
diff changeset
27 apt-get install -y --no-install-recommends postgresql python-psycopg2 && \
105
b69056368901 docker: images optimisation:
Goffi <goffi@goffi.org>
parents: 83
diff changeset
28 apt-get clean && \
b69056368901 docker: images optimisation:
Goffi <goffi@goffi.org>
parents: 83
diff changeset
29 cd /usr/share && \
b69056368901 docker: images optimisation:
Goffi <goffi@goffi.org>
parents: 83
diff changeset
30 hg clone https://repos.goffi.org/sat_pubsub && chown -R sat:sat sat_pubsub && \
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
31
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
32 ############
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
33 # DATABASE #
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
34 ############
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
35
105
b69056368901 docker: images optimisation:
Goffi <goffi@goffi.org>
parents: 83
diff changeset
36 cd sat_pubsub/db && \
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
37
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
38 # To simplify installation, we integrate our own PostgreSQL
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
39 # future alternate version may use an external PostgreSQL container
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
40
105
b69056368901 docker: images optimisation:
Goffi <goffi@goffi.org>
parents: 83
diff changeset
41 service postgresql start; \
b69056368901 docker: images optimisation:
Goffi <goffi@goffi.org>
parents: 83
diff changeset
42 su -c "createuser -d -w sat" postgres; \
b69056368901 docker: images optimisation:
Goffi <goffi@goffi.org>
parents: 83
diff changeset
43 su -c "createdb pubsub" postgres; \
b69056368901 docker: images optimisation:
Goffi <goffi@goffi.org>
parents: 83
diff changeset
44 su -c "psql pubsub < pubsub.sql" sat; \
b69056368901 docker: images optimisation:
Goffi <goffi@goffi.org>
parents: 83
diff changeset
45 service postgresql stop
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
46
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
47 ##########
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 # 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
49 ##########
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
50
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
51 # we need to launch PostgreSQL, so we launch as root then switch to sat user
116
d0a5db5b9bdf docker: fixed bad stopping:
Goffi <goffi@goffi.org>
parents: 105
diff changeset
52 ENTRYPOINT ["launch_postgres_and_pubsub.sh"]