Files
timebank-cc-public/Dockerfile
Ronald Huynen 2547717edb Initial commit
2026-03-23 21:37:59 +01:00

87 lines
2.0 KiB
Docker
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
FROM php:8.3-fpm
# Set Environment Variables
ENV DEBIAN_FRONTEND=noninteractive
ENV COMPOSER_ALLOW_SUPERUSER=1
# Default to production
ENV APP_ENV=production
# Softwares Installation
# Installing tools and PHP extentions using “apt”, “docker-php”, “pecl”,
# Install “curl”, “libmemcached-dev”, “libpq-dev”, “libjpeg-dev”,
# “libpng-dev”, “libfreetype6-dev”, “libssl-dev”, “libmcrypt-dev”,
RUN set -eux; \
apt-get update; \
apt-get upgrade -y; \
apt-get install -y --no-install-recommends \
curl \
ffmpeg \
libmemcached-dev \
libz-dev \
libpq-dev \
libjpeg-dev \
libpng-dev \
libfreetype6-dev \
libssl-dev \
libwebp-dev \
libxpm-dev \
libmcrypt-dev \
libonig-dev \
netcat-traditional \
git \
curl \
zip \
zlib1g-dev \
libicu-dev \
g++ \
unzip; \
rm -rf /var/lib/apt/lists/*
RUN set -eux; \
# Install the PHP pdo_mysql extention
docker-php-ext-install pdo_mysql; \
# Install the PHP pdo_pgsql extention
docker-php-ext-install pdo_pgsql; \
# Install the PHP gd library
docker-php-ext-configure gd \
--prefix=/usr \
--with-jpeg \
--with-webp \
--with-xpm \
--with-freetype; \
# Install exif
docker-php-ext-install exif; \
# Install gd
docker-php-ext-install gd; \
# Install bcmath
docker-php-ext-install bcmath;
RUN docker-php-ext-configure intl
RUN docker-php-ext-install intl
RUN docker-php-ext-install pcntl
RUN docker-php-ext-configure pcntl --enable-pcntl
# Get latest Composer
COPY --from=composer:latest /usr/bin/composer /usr/bin/composer
# Create system user to run Composer and Artisan Commands
RUN useradd -G www-data,root -u 1000 -d /home/app www
RUN mkdir -p /home/app/.composer && \
chown -R www:www /home/app
WORKDIR /var/www
COPY composer.json composer.lock ./
RUN composer install --optimize-autoloader --no-scripts --ignore-platform-req=ext-zip
COPY . .
RUN chown -R 1000:1000 /var/www
USER www
CMD ["php-fpm"]