diff --git a/Dockerfile b/Dockerfile index 85306ae..9e15a3d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,16 +1,10 @@ -FROM php:8.0.9-fpm-alpine3.14 +FROM php:8.0.15-alpine3.15 # Setup ARG defaults -ARG ENVIROMENT=production ARG WORKDIR=/srv/app -ARG USER=root -ARG UID=1000 ARG TZ=UTC -ENV ENVIROMENT=${ENVIROMENT} ENV WORKDIR=${WORKDIR} -ENV USER=${USER} -ENV UID=${UID} ENV TZ=${TZ} # Setup Timezone @@ -26,26 +20,9 @@ RUN docker-php-ext-install pdo_pgsql exif pcntl bcmath gd RUN pecl install redis-5.3.2 \ && docker-php-ext-enable redis -# Install XDebug -RUN if [[ "${ENVIROMENT}" != "production" ]] ; then \ - pecl install xdebug-3.0.2 \ - && docker-php-ext-enable xdebug ; \ - fi - # Get latest Composer COPY --from=composer:latest /usr/bin/composer /usr/bin/composer -# Set default php.ini -RUN mv "${PHP_INI_DIR}/php.ini-${ENVIROMENT}" "${PHP_INI_DIR}/php.ini" - -# Setup uID for user -RUN if [[ "${ENVIROMENT}" != "production" ] && [ "${USER}" != "root" ]] ; then \ - usermod -u ${UID} ${USER} ; \ - fi - -# Setup User -USER ${USER} - # Set Working Dir WORKDIR ${WORKDIR} diff --git a/README.md b/README.md index a65839b..539c7c0 100644 --- a/README.md +++ b/README.md @@ -4,8 +4,8 @@ Optimised for Laravel 8. -- Alpine 3.14 -- PHP 8.0.9 +- Alpine 3.15 +- PHP 8.0.15 - Composer 2 - XDebug 3 @@ -15,30 +15,8 @@ Supports Redis and PostgreSQL. ``` # Defaults -ENVIRONMENT=production WORKDIR=/srv/app -USER=root TZ=UTC - -# Set if ENVIROMENT != production && USER != root -UID=1000 -``` - -`ENVIRONMENT` defines weather `development` or `production` php.ini template is used. - -## XDebug - -XDebug is only installed when build with `ENVIROMENT="development"` and is disabled by default. - -Enable with: - -``` -# php.ini - -[xdebug] -xdebug.mode=debug -xdebug.client_host=host.docker.internal -xdebug.client_port="9003" ``` https://github.com/nicekiwi/docker-php