-
Notifications
You must be signed in to change notification settings - Fork 7
/
Dockerfile
51 lines (38 loc) · 1.41 KB
/
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
41
42
43
44
45
46
47
48
49
50
51
FROM php:7.3-apache
# ==============================================================================
# Set up the machine
# ------------------------------------------------------------------------------
COPY --from=composer:latest /usr/bin/composer /usr/local/bin/composer
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
RUN export DEBIAN_FRONTEND=noninteractive \
&& apt-get update && \
apt-get install -y --no-install-recommends \
git \
libzip-dev \
zlib1g-dev \
&& rm -rf /var/lib/apt/lists/*
RUN mkdir /tls && openssl req -new -x509 -days 365 -nodes \
-out /tls/server.cert \
-keyout /tls/server.key \
-subj "/C=NL/ST=Overijssel/L=Enschede/O=PDS Interop/OU=IT/CN=pdsinterop.org"
RUN docker-php-ext-install \
bcmath \
mbstring \
mysqli \
pdo \
pdo_mysql \
zip
RUN a2enmod headers rewrite ssl
COPY site.conf /etc/apache2/sites-enabled/site.conf
WORKDIR /app
EXPOSE 443
# ==============================================================================
# ==============================================================================
# Add the source code
# ------------------------------------------------------------------------------
ARG PROJECT_PATH
RUN : "${PROJECT_PATH:=$PWD}"
COPY "${PROJECT_PATH}" /app/
RUN composer install --no-dev --prefer-dist
RUN chown -R www-data:www-data /app
# ==============================================================================