Skip to content

Commit

Permalink
Skip repeated apt-get update & use node v20
Browse files Browse the repository at this point in the history
  • Loading branch information
vaibhavpandeyvpz authored Jul 3, 2024
1 parent b17ccec commit f71b5cd
Showing 1 changed file with 9 additions and 17 deletions.
26 changes: 9 additions & 17 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,29 +7,24 @@ RUN apt-get update && \
apt-get install -y curl git zip

# install basic extensions
RUN apt-get update && \
apt-get install -y libxml2-dev && \
RUN apt-get install -y libxml2-dev && \
docker-php-ext-install bcmath ctype exif fileinfo opcache pcntl pdo_mysql xml

# install php-curl extension
RUN apt-get update && \
apt-get install -y libcurl3-dev && \
RUN apt-get install -y libcurl3-dev && \
docker-php-ext-install curl

# install php-gd extension
RUN apt-get update && \
apt-get install -y libfreetype6-dev libjpeg62-turbo-dev libpng-dev libwebp-dev && \
RUN apt-get install -y libfreetype6-dev libjpeg62-turbo-dev libpng-dev libwebp-dev && \
docker-php-ext-configure gd --with-freetype --with-jpeg --with-webp && \
docker-php-ext-install -j$(nproc) gd

# install php-gmp extension
RUN apt-get update && \
apt-get install -y libgmp-dev && \
RUN apt-get install -y libgmp-dev && \
docker-php-ext-install gmp

# install php-imagick extension
RUN apt-get update && \
apt-get install -y libmagickwand-dev && \
RUN apt-get install -y libmagickwand-dev && \
git clone https://github.com/Imagick/imagick.git --single-branch /tmp/imagick && \
cd /tmp/imagick && \
phpize && \
Expand All @@ -39,8 +34,7 @@ RUN apt-get update && \
docker-php-ext-enable imagick

# install php-intl extension
RUN apt-get update && \
apt-get -y install libicu-dev && \
RUN apt-get -y install libicu-dev && \
docker-php-ext-configure intl && \
docker-php-ext-install intl

Expand All @@ -54,19 +48,17 @@ ARG xdebugVersion
RUN if [ ! -z "$xdebugVersion" ]; then pecl install xdebug-$xdebugVersion && docker-php-ext-enable xdebug; fi

# install php-zip extension
RUN apt-get update && \
apt-get install -y libzip-dev && \
RUN apt-get install -y libzip-dev && \
docker-php-ext-install -j$(nproc) zip

# install composer
COPY --from=composer /usr/bin/composer /usr/bin/composer

# install mysql client
RUN apt-get update && \
apt-get install -y default-mysql-client
RUN apt-get install -y default-mysql-client

# install Node.js and npm
RUN curl -fsSL https://deb.nodesource.com/setup_18.x | bash - && \
RUN curl -fsSL https://deb.nodesource.com/setup_20.x | bash - && \
apt-get install -y nodejs

# install Yarn package manager
Expand Down

0 comments on commit f71b5cd

Please sign in to comment.