-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
33 lines (26 loc) · 901 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
FROM php:8.3-cli AS build
RUN apt-get update && \
apt-get install -y git && \
apt-get install -y unzip
RUN pecl install apcu \
&& docker-php-ext-enable apcu
COPY --from=composer:latest /usr/bin/composer /usr/local/bin/composer
WORKDIR /app
COPY composer.json composer.lock src ./
RUN composer install -o --no-dev
FROM php:8.3-apache
RUN apt-get update && \
apt-get install -y libpq-dev && \
docker-php-ext-install pdo_pgsql
RUN pecl install apcu \
&& docker-php-ext-enable apcu
RUN a2enmod rewrite
COPY --from=build /app/vendor/ /var/www/vendor/
COPY templates/ /var/www/templates/
COPY scripts/ /var/www/scripts/
COPY src/ /var/www/src/
COPY public/ /var/www/html/
COPY entrypoint-wrapper.sh /usr/local/bin/entrypoint-wrapper
RUN sed -i "s/80/8080/g" /etc/apache2/sites-available/000-default.conf /etc/apache2/ports.conf
EXPOSE 8080
ENTRYPOINT [ "entrypoint-wrapper" ]