Skip to content

Instantly share code, notes, and snippets.

@opdavies
Created August 5, 2021 20:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save opdavies/35b0f03bc453edb9896d63f82f48e128 to your computer and use it in GitHub Desktop.
Save opdavies/35b0f03bc453edb9896d63f82f48e128 to your computer and use it in GitHub Desktop.
FROM php:7.4-fpm-alpine AS base
ENV PATH=$PATH:/app/vendor/bin
WORKDIR /app
RUN apk add --no-cache \
libpng-dev \
mariadb-client \
&& docker-php-ext-install \
bcmath \
gd \
pdo_mysql
RUN mkdir -p web/sites/default/files \
&& chown -R www-data:www-data web/sites/default/files
FROM base AS dev
RUN apk add --no-cache \
git \
unzip
COPY --from=composer /usr/bin/composer /usr/bin/composer
ENV COMPOSER_MEMORY_LIMIT=-1
WORKDIR /app
COPY composer.json .
COPY composer.lock .
RUN composer install
RUN mkdir -p web/sites/simpletest \
&& chmod -R a+w web/sites/simpletest
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment