~mediagoblin/mediagoblin

mediagoblin/Dockerfile-fedora-33-sqlite -rw-r--r-- 2.6 KiB
522a61b2Ben Sturmfels Move permissions lines. 3 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
# A Dockerfile for MediaGoblin hacking.
#
# IMPORTANT: This Dockerfile is not an officially supported approach to
# deploying MediaGoblin. It is experimental and intended for helping developers
# run the test suite. To deploy MediaGoblin, see:
#
# https://mediagoblin.readthedocs.io/en/master/siteadmin/deploying.html
#
# See Dockerfile-debian-10-sqlite for details.

FROM fedora:33

RUN dnf -y install \
automake \
gcc \
git-core \
make \
nodejs \
npm \
python3-devel \
virtualenv

RUN dnf -y install \
findutils \
# To build waitress on Fedora 33 (not required for 31)
libffi-devel \
python3-lxml \
python3-pillow \
which

RUN dnf -y install \
python3-pytest \
python3-pytest-xdist \
python3-snowballstemmer \
python3-sphinx \
# Not in Fedora
# python3-sphinxcontrib.websupport \
python3-webtest

RUN dnf -y install \
gstreamer1-plugins-base \
gstreamer1-plugins-bad-free \
gstreamer1-plugins-good \
gstreamer1-plugins-ugly-free \
python3-numpy

RUN dnf -y install \
python3-gobject \
python3-gstreamer1 \
gstreamer1-plugin-openh264

# RUN apt-get install -y \
# poppler-utils

# Install raw image dependencies.
# TODO

# Install LDAP depedencies.
RUN dnf -y install python3-ldap

# Install OpenID dependencies.
RUN dnf -y install python3-openid

RUN groupadd www-data
RUN groupadd --system mediagoblin --gid 1024
RUN adduser www-data -g www-data -G mediagoblin

RUN mkdir /opt/mediagoblin
RUN chown -R www-data:www-data /opt/mediagoblin
WORKDIR /opt/mediagoblin

RUN mkdir --mode=g+w /var/www
RUN chown root:www-data /var/www

USER www-data

RUN git clone --depth=1 git://git.savannah.gnu.org/mediagoblin.git --branch master .
RUN git show --oneline --no-patch

RUN ./bootstrap.sh
RUN ./configure
RUN make

RUN ./bin/python -m pip freeze

RUN ./bin/python -m pytest -rs ./mediagoblin/tests --boxed

RUN cd docs && make html

RUN echo '[[mediagoblin.media_types.audio]]' >> mediagoblin.ini
RUN echo '[[mediagoblin.media_types.video]]' >> mediagoblin.ini
# RUN echo '[[mediagoblin.media_types.raw_image]]' >> mediagoblin.ini
# RUN echo '[[mediagoblin.media_types.pdf]]' >> mediagoblin.ini

# Fedora only
RUN ./bin/pip install certifi
RUN ./bin/gmg dbupdate
RUN ./bin/gmg adduser --username admin --password a --email admin@example.com
RUN ./bin/gmg makeadmin admin

# Without the following we get "ModuleNotFoundError: No module named
# 'paste.script'" when running ./lazyserver.sh. Not sure why as PasteScript is
# in the setup.py requirements. Before this we have Paste==3.4.0; after we have
# Paste==3.5.0.
RUN ./bin/pip install PasteScript --force-reinstall

EXPOSE 6543/tcp

CMD ["./lazyserver.sh", "--server-name=broadcast"]