Docker/compose updates (#1280)
* Docker/compose updates * Fix container name * Add zip to the ext install * Don't mount the env.php file * Use newer "docker compose" command * Install composer * Remove chown
This commit is contained in:
parent
f3b032e56b
commit
0b27635fcb
17
Dockerfile
17
Dockerfile
@ -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
|
||||
@ -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
Makefile
2
Makefile
@ -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:
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user