Skip to content

Commit

Permalink
Merge pull request #18 from utopia-php/feat-reduce-docker-size
Browse files Browse the repository at this point in the history
Delete postgresql-dev to reduce docker layer size
  • Loading branch information
christyjacob4 authored Oct 16, 2023
2 parents b2fd3a8 + 0570481 commit b3cb3ca
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,11 @@ COPY composer.json /usr/local/src/
RUN composer install --ignore-platform-reqs

FROM php:8.1.21-fpm-alpine3.18 as tests
RUN set -ex && apk --no-cache add postgresql-dev
RUN docker-php-ext-install pdo pdo_pgsql
# Postgres
RUN set -ex \
&& apk --no-cache add postgresql-libs postgresql-dev \
&& docker-php-ext-install pdo pdo_pgsql \
&& apk del postgresql-dev
COPY ./src /app/src
COPY ./tests /app/src/tests
COPY --from=composer /usr/local/src/vendor /app/vendor
Expand Down

0 comments on commit b3cb3ca

Please sign in to comment.