30 - Fix dev Dockerfile: remove Node.js apt conflict, drop composer.lock dependency
This commit is contained in:
parent
ed17529906
commit
0861cff8b4
1 changed files with 5 additions and 7 deletions
|
|
@ -9,23 +9,21 @@ RUN apt-get update && apt-get install -y \
|
||||||
libxml2-dev \
|
libxml2-dev \
|
||||||
zip \
|
zip \
|
||||||
unzip \
|
unzip \
|
||||||
nodejs \
|
|
||||||
npm \
|
|
||||||
default-mysql-client \
|
default-mysql-client \
|
||||||
&& docker-php-ext-install pdo_mysql mbstring exif pcntl bcmath gd
|
&& docker-php-ext-install pdo_mysql mbstring exif pcntl bcmath gd
|
||||||
|
|
||||||
|
# Install Node.js 20.x via nodesource
|
||||||
|
RUN curl -fsSL https://deb.nodesource.com/setup_20.x | bash - \
|
||||||
|
&& apt-get install -y nodejs
|
||||||
|
|
||||||
# Install Composer
|
# Install Composer
|
||||||
COPY --from=composer:latest /usr/bin/composer /usr/bin/composer
|
COPY --from=composer:latest /usr/bin/composer /usr/bin/composer
|
||||||
|
|
||||||
# Set working directory
|
# Set working directory
|
||||||
WORKDIR /var/www/html
|
WORKDIR /var/www/html
|
||||||
|
|
||||||
# Install Node.js 20.x (for better compatibility)
|
|
||||||
RUN curl -fsSL https://deb.nodesource.com/setup_20.x | bash - \
|
|
||||||
&& apt-get install -y nodejs
|
|
||||||
|
|
||||||
# Copy composer files and install PHP dependencies
|
# Copy composer files and install PHP dependencies
|
||||||
COPY composer.json composer.lock ./
|
COPY composer.json ./
|
||||||
RUN composer install --no-dev --optimize-autoloader --no-scripts
|
RUN composer install --no-dev --optimize-autoloader --no-scripts
|
||||||
|
|
||||||
# Copy package.json and install Node dependencies
|
# Copy package.json and install Node dependencies
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue