-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
40 lines (30 loc) · 939 Bytes
/
Dockerfile
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
# Use Apache
FROM php:8.0-apache
# Install Python 3
RUN apt-get update
RUN apt-get install -y python3 ; apt-get clean
# Install nodejs (for demo website)
RUN apt-get install -y nodejs npm ; apt-get clean
# npm doesn't like running in /
WORKDIR /code
# Install Javascript minifier
RUN npm update
RUN npm install -g bower uglify-js less less-plugin-clean-css
# Copy code into container
WORKDIR /code
ADD build build
ADD src src
ADD website website
# Install demo website dependencies
ADD bower.json bower.json
ADD .bowerrc .bowerrc
RUN bower install
# Produce distributable version of website
RUN /code/build/build.py
# Enable required Apache modules
RUN ln -s /etc/apache2/mods-available/headers.load /etc/apache2/mods-enabled/
RUN ln -s /etc/apache2/mods-available/rewrite.load /etc/apache2/mods-enabled/
# Serve demo website via Apache
RUN rm -Rf /var/www/html ; ln -s /code/dist /var/www/html
# Expose port 80 (http)
EXPOSE 80