Skip to content

Commit df28728

Browse files
committed
change: Move to Composer from docker
1 parent c24c39e commit df28728

2 files changed

Lines changed: 9 additions & 9 deletions

File tree

Dockerfile

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,19 @@
1-
FROM php:8.1.18-apache
1+
FROM php:8.1-apache
22

33
RUN apt-get update && apt-get install -y git
44

5+
COPY ./app /var/www/html
6+
57
ENV APACHE_DOCUMENT_ROOT /var/www/html/public
68

79
RUN sed -ri -e 's!/var/www/html!${APACHE_DOCUMENT_ROOT}!g' /etc/apache2/sites-available/*.conf
810
RUN sed -ri -e 's!/var/www/!${APACHE_DOCUMENT_ROOT}!g' /etc/apache2/apache2.conf /etc/apache2/conf-available/*.conf
911

1012
# Install Composer
11-
RUN curl -sS https://getcomposer.org/installer | php -- --check && \
12-
export COMPOSER_MEMORY_LIMIT=-1 && \
13-
composer self-update --1 && \
14-
composer install --no-interaction --optimize-autoloader
13+
COPY --from=composer /usr/bin/composer /usr/bin/composer
14+
RUN alias composer='php /usr/bin/composer'
15+
16+
WORKDIR /var/www/html
17+
RUN composer update && composer install
1518

16-
RUN a2enmod rewrite && service apache2 restart
19+
RUN a2enmod rewrite && service apache2 restart

docker-compose.yaml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
version: '3.1'
22
services:
33
httpd:
4-
image: php:8.1.18-apache
5-
volumes:
6-
- ./app:/var/www/html
74
ports:
85
- 8080:80
96
build: .

0 commit comments

Comments
 (0)