Skip to content

Commit 9069fdc

Browse files
author
Bart Wesselink
committed
RDS-6 - Install precompiled version of libvips
1 parent 74545f4 commit 9069fdc

File tree

4 files changed

+7
-18
lines changed

4 files changed

+7
-18
lines changed

.github/workflows/build.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,10 @@ jobs:
1414
strategy:
1515
matrix:
1616
php:
17+
- '^(7\.4)-apache$'
1718
- '^(8\.0)-apache$'
1819
- '^(8\.1)-apache$'
20+
- '^(7\.4)-fpm$'
1921
- '^(8\.0)-fpm$'
2022
- '^(8\.1)-fpm$'
2123
steps:
@@ -31,6 +33,6 @@ jobs:
3133
- name: Yarn install
3234
run: yarn
3335
- name: Yarn start
34-
run: 'yarn start "${{ matrix.php }}"'
36+
run: 'yarn start "${{ matrix.php }}" "linux/amd64,linux/arm64"'
3537
env:
3638
INPUT_TOKEN: ${{ secrets.GITHUB_TOKEN }}

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
Docker image made to run symfony application. Check https://hub.docker.com/r/recognizebv/symfony-docker
55

66
## Available variants
7-
- php8.0, php8.1 (PHP Version)
7+
- php7.4, php8.0, php8.1 (PHP Version)
88
- -node10, -node12, -node14, -node16 (Node LTS versions)
99
- -image (vips and imagick)
1010
- -dev (XDebug)

apache/Dockerfile

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -53,24 +53,10 @@ RUN (curl -SL --fail -o node.tar.xz "https://nodejs.org/dist/$NODE_VERSION/node-
5353
&& ln -s /usr/local/bin/node /usr/local/bin/nodejs \
5454
&& npm install --global yarn
5555

56-
ARG LIBVIPS_VERSION=8.8.3
5756
ARG ENABLE_IMAGE_SUPPORT=false
5857
RUN $ENABLE_IMAGE_SUPPORT \
5958
&& apt-get update \
60-
&& apt-get install -y --no-install-recommends build-essential pkg-config libglib2.0-dev libexpat1-dev \
61-
# Image format packages JPEG, EXIF, GIF, Quantized PNG, Text rendering, WebP
62-
libjpeg62-turbo-dev libexif-dev libgif-dev libpango1.0-dev libwebp-dev libmagickwand-dev \
63-
&& cd /tmp \
64-
&& curl -L -O https://github.com/libvips/libvips/releases/download/v$LIBVIPS_VERSION/vips-$LIBVIPS_VERSION.tar.gz \
65-
&& tar zxvf vips-$LIBVIPS_VERSION.tar.gz \
66-
&& cd /tmp/vips-$LIBVIPS_VERSION \
67-
&& ./configure \
68-
&& make \
69-
&& make install \
70-
&& ldconfig \
71-
&& apt-get remove -y build-essential \
72-
&& apt-get autoremove -y \
73-
&& apt-get autoclean \
59+
&& apt-get install -y libvips-dev \
7460
&& apt-get clean \
7561
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* \
7662
&& pecl install vips imagick \

src/index.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,12 +97,13 @@ async function buildAndPushImage(docker: Docker, phpVersion: PhpVersion, nodeVer
9797
const imageName = 'recognizebv/symfony-docker';
9898
const tagName = `php${phpVersion.version}${phpVersion.webServer === WebServerType.NGINX ? '-nginx' : ''}-node${nodeVersion.major}` + (imageSupport ? '-image' : '') + (debug ? '-dev' : '');
9999
const tag = imageName + ':' + tagName;
100+
const architecture = process.argv[3] ?? 'linux/amd64';
100101

101102
console.log('Building image ' + tag);
102103
const childProcess = spawn('docker', [
103104
'buildx',
104105
'build',
105-
'--platform', 'linux/amd64,linux/arm64',
106+
'--platform', architecture,
106107
'--push',
107108
'-f', phpVersion.webServer === WebServerType.NGINX ? 'nginx/Dockerfile' : 'apache/Dockerfile',
108109
'--tag', `${imageName}:${tagName}`,

0 commit comments

Comments
 (0)