Skip to content

Commit 706d961

Browse files
committed
fix(docker): changed attempt to install gd
1 parent 5c64b73 commit 706d961

File tree

2 files changed

+18
-4
lines changed

2 files changed

+18
-4
lines changed

production.Dockerfile

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,14 @@
11
FROM laravelphp/vapor:php81
22

33
# install gd
4-
RUN docker-php-ext-configure gd --with-freetype=/usr/lib/ --with-jpeg=/usr/lib/ && \
5-
docker-php-ext-install gd
4+
RUN apk add --no-cache freetype libpng libjpeg-turbo freetype-dev libpng-dev libjpeg-turbo-dev && \
5+
docker-php-ext-configure gd \
6+
--with-gd \
7+
--with-freetype-dir=/usr/include/ \
8+
--with-png-dir=/usr/include/ \
9+
--with-jpeg-dir=/usr/include/ && \
10+
NPROC=$(grep -c ^processor /proc/cpuinfo 2>/dev/null || 1) && \
11+
docker-php-ext-install -j${NPROC} gd && \
12+
apk del --no-cache freetype-dev libpng-dev libjpeg-turbo-dev
613

714
COPY . /var/task

staging.Dockerfile

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,14 @@
11
FROM laravelphp/vapor:php81
22

33
# install gd
4-
RUN docker-php-ext-configure gd --with-freetype=/usr/lib/ --with-jpeg=/usr/lib/ && \
5-
docker-php-ext-install gd
4+
RUN apk add --no-cache freetype libpng libjpeg-turbo freetype-dev libpng-dev libjpeg-turbo-dev && \
5+
docker-php-ext-configure gd \
6+
--with-gd \
7+
--with-freetype-dir=/usr/include/ \
8+
--with-png-dir=/usr/include/ \
9+
--with-jpeg-dir=/usr/include/ && \
10+
NPROC=$(grep -c ^processor /proc/cpuinfo 2>/dev/null || 1) && \
11+
docker-php-ext-install -j${NPROC} gd && \
12+
apk del --no-cache freetype-dev libpng-dev libjpeg-turbo-dev
613

714
COPY . /var/task

0 commit comments

Comments
 (0)