Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# Treat SVGs like images, and not like text.
*.svg binary
Dockerfile text eol=lf
Podmanfile text eol=lf
*.sh eol=lf
1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# syntax=docker/dockerfile:1
# Please keep the content of this file in sync with Podmanfile.

ARG BUILDER_CONFIGURATION="release"
FROM php:7.4-apache@sha256:c9d7e608f73832673479770d66aacc8100011ec751d1905ff63fae3fe2e0ca6d AS composer-builder
Expand Down
40 changes: 40 additions & 0 deletions Podmanfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# 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.

Comment thread
Linsner marked this conversation as resolved.
ARG BUILDER_CONFIGURATION="release"
FROM docker.io/library/php:7.4-apache@sha256:c9d7e608f73832673479770d66aacc8100011ec751d1905ff63fae3fe2e0ca6d AS composer-builder

# 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
COPY resources/keyman-site.conf /etc/apache2/conf-available/
RUN cp /usr/local/etc/php/php.ini-production /usr/local/etc/php/php.ini
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
Loading