Skip to content

Commit

Permalink
add composer to dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
saravahdatipour committed Dec 2, 2024
1 parent 35a48e2 commit a6be359
Showing 1 changed file with 18 additions and 4 deletions.
22 changes: 18 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,15 +1,29 @@
FROM node:14 AS build

FROM node:14 AS builder

RUN apt-get update && apt-get install -y \
php \
php-cli \
php-zip \
php-xml \
php-mbstring \
php-curl \
php-sqlite3 \
php-ldap \
unzip \
cron

RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
WORKDIR /app

COPY . .

RUN cd /app/www && npm install
RUN cd /app/www && composer install

FROM php:8.0-apache

COPY --from=build /app/www /var/www/html
COPY --from=build /app/data /app/data
COPY --from=builder /app/www /var/www/html
COPY --from=builder /app/data /app/data

RUN chown -R www-data:www-data /var/www/html \
&& chmod -R 755 /var/www/html
Expand Down

0 comments on commit a6be359

Please sign in to comment.