-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Switch to install-php-extensions * Set image labels at the end of the Dockerfile * Copy the entrypoint program at the beginning * Install the ldap extension for php to fix issue 58 * Add plugins configuration files in volume /config --------- Co-authored-by: Robin Alexander <[email protected]>
- Loading branch information
Showing
2 changed files
with
22 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,17 @@ | ||
ARG PHP_VERSION | ||
FROM php:${PHP_VERSION}-apache | ||
|
||
# Copy the entrypoint program | ||
COPY entrypoint.sh /usr/local/bin/ | ||
RUN chmod +x /usr/local/bin/entrypoint.sh | ||
|
||
# Install composer | ||
COPY --from=composer/composer:latest-bin /composer /usr/bin/composer | ||
|
||
# Add command install-php-extensions | ||
ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/ | ||
RUN chmod +x /usr/local/bin/install-php-extensions | ||
|
||
# Customize | ||
ARG APP_GH_REF | ||
ENV DEBIAN_FRONTEND=noninteractive | ||
|
@@ -13,7 +21,6 @@ RUN set -ex; \ | |
apt-get update; \ | ||
apt-get upgrade --yes; \ | ||
apt-get install --yes --no-install-recommends git unzip; \ | ||
apt-get install --yes libpng-dev libjpeg-dev; \ | ||
apt-get clean; \ | ||
rm -rf /var/lib/apt/lists/* | ||
|
||
|
@@ -22,9 +29,7 @@ RUN set -ex; \ | |
cp "$PHP_INI_DIR/php.ini-production" "$PHP_INI_DIR/php.ini"; \ | ||
a2enmod rewrite; \ | ||
a2enmod headers; \ | ||
docker-php-ext-configure gd --with-jpeg; \ | ||
docker-php-ext-install -j$(nproc) gd; \ | ||
docker-php-ext-install -j$(nproc) mysqli; \ | ||
install-php-extensions mysqli gd ldap; \ | ||
pecl install timezonedb; \ | ||
docker-php-ext-enable timezonedb | ||
|
||
|
@@ -55,19 +60,15 @@ RUN set -ex; \ | |
chown www-data:www-data /app.log; \ | ||
mkdir /config | ||
|
||
# Declarations | ||
VOLUME /config | ||
ENTRYPOINT ["entrypoint.sh"] | ||
CMD ["apache2-foreground"] | ||
|
||
# Labels | ||
LABEL org.opencontainers.image.title="LibreBooking" | ||
LABEL org.opencontainers.image.description="LibreBooking as a container" | ||
LABEL org.opencontainers.image.url="https://github.com/librebooking/docker" | ||
LABEL org.opencontainers.image.source="https://github.com/librebooking/docker" | ||
LABEL org.opencontainers.image.licenses="GPL-3.0" | ||
LABEL org.opencontainers.image.authors="[email protected]" | ||
|
||
# Copy the entrypoint program | ||
COPY entrypoint.sh /usr/local/bin/ | ||
RUN chmod +x /usr/local/bin/entrypoint.sh | ||
|
||
# Declarations | ||
VOLUME /config | ||
ENTRYPOINT ["entrypoint.sh"] | ||
CMD ["apache2-foreground"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters