forked from open-oni/open-oni
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathweb.dockerfile
More file actions
executable file
·42 lines (35 loc) · 1.45 KB
/
web.dockerfile
File metadata and controls
executable file
·42 lines (35 loc) · 1.45 KB
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
FROM ubuntu:focal
# Set locale to UTF8.
ENV DEBIAN_FRONTEND noninteractive
ENV LC_ALL en_US.UTF-8
ENV LANG en_US.UTF-8
# Define directory paths.
ENV OPENONI_INSTALL_DIR="/opt/openoni"
ENV ENTRYPOINT_SCRIPT_PATH="${OPENONI_INSTALL_DIR}/web-entrypoint.sh"
RUN apt-get -y update && \
apt-get -y upgrade && \
# Install locales and set locale to UTF8.
apt-get -y install tzdata locales ca-certificates && \
apt-get upgrade ca-certificates -y && \
locale-gen en_US.UTF-8 && \
update-locale LANG=en_US.UTF-8 && \
# Set time zone to US Central.
ln -fs /usr/share/zoneinfo/US/Central /etc/localtime && \
# Install packages.
apt-get -y install --no-install-recommends \
apache2 gcc git libmysqlclient-dev \
libssl-dev libxml2-dev libxslt-dev libjpeg-dev \
mysql-client curl rsync python3-dev python3-venv nano acl && \
apt-get -y install --no-install-recommends libapache2-mod-wsgi-py3
# Kept from original Open ONI proj.
RUN ln -sf /proc/self/fd/1 /var/log/apache2/error.log && \
a2enmod cache cache_disk expires rewrite proxy_http ssl && \
mkdir -p /var/cache/httpd/mod_disk_cache && \
chown -R www-data:www-data /var/cache/httpd && \
a2dissite 000-default.conf && \
rm /bin/sh && ln -s /bin/bash /bin/sh
RUN echo "/usr/local/bin/manage delete_cache" > /etc/cron.daily/delete_cache && \
chmod +x /etc/cron.daily/delete_cache
WORKDIR ${OPENONI_INSTALL_DIR}
EXPOSE 80
ENTRYPOINT ${ENTRYPOINT_SCRIPT_PATH}