-
-
Notifications
You must be signed in to change notification settings - Fork 46
Expand file tree
/
Copy pathPodmanfile
More file actions
50 lines (40 loc) · 1.7 KB
/
Copy pathPodmanfile
File metadata and controls
50 lines (40 loc) · 1.7 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
43
44
45
46
47
48
49
50
# syntax=docker/dockerfile:1
# Please keep the content of this file in sync with Dockerfile.
# Take care to have here the full path to the images. Podman cannot handle Docker's short form.
ARG BUILDER_CONFIGURATION="release"
FROM docker.io/library/php:7.4-apache@sha256:c9d7e608f73832673479770d66aacc8100011ec751d1905ff63fae3fe2e0ca6d AS composer-builder
ENV BUILDER_PLATFORM=docker-composer
# Install Zip to use composer
RUN apt-get update && apt-get install -y \
zlib1g-dev \
libzip-dev \
unzip
RUN docker-php-ext-install zip
# Install and update composer
COPY --from=docker.io/library/composer /usr/bin/composer /usr/bin/composer
RUN composer self-update
# Do not switch the user! Podman needs root to install composer.
WORKDIR /composer
COPY composer.* /composer/
# Consume the build argment
ARG BUILDER_CONFIGURATION
RUN if [ "$BUILDER_CONFIGURATION" = "debug" ]; then \
# composer install --dev deprecated
COMPOSER_NO_DEV=0 composer install ; \
else \
COMPOSER_NO_DEV=1 composer install ; \
fi
# Site
FROM docker.io/library/php:7.4-apache@sha256:c9d7e608f73832673479770d66aacc8100011ec751d1905ff63fae3fe2e0ca6d
ENV BUILDER_PLATFORM=docker
COPY resources/keyman-site.conf /etc/apache2/conf-available/
ARG BUILDER_CONFIGURATION
RUN if [ "$BUILDER_CONFIGURATION" = "debug" ]; then \
cp /usr/local/etc/php/php.ini-development /usr/local/etc/php/php.ini ; \
else \
cp /usr/local/etc/php/php.ini-production /usr/local/etc/php/php.ini ; \
fi
RUN chown -R www-data:www-data /var/www/html/
COPY --from=composer-builder /composer/vendor /var/www/vendor
RUN a2enmod rewrite headers; a2enconf keyman-site
# RUN echo LogLevel alert rewrite:trace6 >> /etc/apache2/apache2.conf