This repository has been archived by the owner on Sep 21, 2023. It is now read-only.
forked from msoos/cryptominisat
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile.web
54 lines (41 loc) · 1.42 KB
/
Dockerfile.web
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
FROM ubuntu:16.04
LABEL maintainer="Mate Soos"
LABEL version="5.0"
LABEL Description="An advanced SAT solver"
ENV LOCALE en_US.UTF-8
EXPOSE 80
RUN apt-get update && \
DEBIAN_FRONTEND=noninteractive apt-get install --no-install-recommends -y apache2 apache2-utils libapache2-mod-php php-sqlite3 && rm -rf /var/lib/apt/lists/*
# generate dygraph & get nodejs
# cd web
# ./install_web.sh
# Setup Apache
RUN mkdir -p /var/www/site
RUN chown -R www-data: /var/www/site
# Enable apache mods.
RUN a2enmod php7.0
RUN a2enmod rewrite
# Update the PHP.ini file, enable <? ?> tags and quieten logging.
RUN sed -i "s/short_open_tag = Off/short_open_tag = On/" /etc/php/7.0/apache2/php.ini
RUN sed -i "s/error_reporting = .*$/error_reporting = E_ERROR | E_WARNING | E_PARSE/" /etc/php/7.0/apache2/php.ini
# Expose apache
EXPOSE 80
# Manually set up the apache environment variables
ENV APACHE_RUN_USER www-data
ENV APACHE_RUN_GROUP www-data
ENV APACHE_LOG_DIR /var/log/apache2
ENV APACHE_LOCK_DIR /var/lock/apache2
ENV APACHE_PID_FILE /var/run/apache2.pid
# copy dirs
COPY ./web/ /var/www/site
ADD ./web/apache-config.conf /etc/apache2/sites-enabled/000-default.conf
CMD /usr/sbin/apache2ctl -D FOREGROUND
# --------------------
# HOW TO USE
# --------------------
# run normally:
# docker run --rm -p 8080:80 -i -t cmsweb
# -> will be accessible from host on 8080
# how to debug:
# docker run --rm -p 8080:80 -i -t cmsweb bash
# -> will drop to shell