Created
March 1, 2022 13:01
-
-
Save KentarouTakeda/2d86c2d13da51610ffe6ea9f0bacee36 to your computer and use it in GitHub Desktop.
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
FROM php:8.1-fpm-alpine as base | |
RUN apk add --no-cache \ | |
autoconf g++ gcc libzip libzip-dev make postgresql postgresql-dev zlib zlib-dev \ | |
&& docker-php-ext-install \ | |
bcmath opcache pdo pdo_pgsql zip \ | |
&& apk del \ | |
autoconf g++ gcc libzip-dev make zlib-dev \ | |
&& curl -qs -o /usr/local/bin/composer https://getcomposer.org/download/latest-2.x/composer.phar \ | |
&& chmod +x /usr/local/bin/composer | |
FROM base as development | |
RUN apk add --no-cache \ | |
autoconf g++ gcc make \ | |
&& pecl install \ | |
pcov xdebug \ | |
&& docker-php-ext-enable \ | |
pcov xdebug \ | |
&& apk del \ | |
autoconf g++ gcc make | |
FROM base as deploy | |
COPY ["composer.json", "composer.lock", "./"] | |
RUN composer install --no-dev | |
COPY . . |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment