Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docker/compose updates #1280

Merged
merged 9 commits into from
Sep 29, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 11 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
FROM php:7.4-fpm-alpine
FROM php:8.0.9-fpm-alpine3.14

WORKDIR /var/www/

RUN apk add gmp-dev icu-dev zlib-dev libpng-dev
# Setup composer
COPY --from=composer:2.1.5 /usr/bin/composer /usr/local/bin/composer

RUN apk add gmp-dev icu-dev zlib-dev libpng-dev libzip-dev zip
RUN curl --silent --show-error https://getcomposer.org/installer | php

# Copy any config files in
Expand All @@ -16,17 +19,19 @@ RUN docker-php-ext-install \
pdo_mysql \
gd \
gmp \
opcache && \
docker-php-ext-enable pdo_mysql opcache
bcmath \
opcache \
zip && \
docker-php-ext-enable pdo_mysql opcache bcmath zip

COPY . /var/www/
RUN php composer.phar install \
RUN composer install \
--ignore-platform-reqs \
--no-interaction \
--no-plugins \
--no-scripts \
--prefer-dist

RUN chown -R www-data:www-data /var/www
#RUN chown -R www-data:www-data /var/www

EXPOSE 9000
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ reset-installer:

.PHONY: docker-test
docker-test:
@docker-compose -f docker-compose.yml -f docker-compose.local.yml up
@docker compose -f docker-compose.yml -f docker-compose.local.yml up

.PHONY: docker-clean
docker-clean:
Expand Down
3 changes: 1 addition & 2 deletions docker-compose.local.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,8 @@ services:
- ./tests:/var/www/tests
- ./composer.json:/var/www/composer.json
- ./composer-lock.json:/var/www/composer-lock.json
- ./env.php:/var/www/env.php
#- ./env.php:/var/www/env.php
- ./resources/docker/php/www.conf:/usr/local/etc/php-fpm.d/www.conf
- ./vendor:/var/www/vendor
depends_on:
- mysql
- redis