Skip to content

Commit bb3b997

Browse files
authored
Merge pull request #586 from TimWolla/tideways-installation
Use official `ghcr.io/tideways/php` docker image for Tideways installation
2 parents fe4e9b2 + 388e95d commit bb3b997

File tree

1 file changed

+7
-10
lines changed

1 file changed

+7
-10
lines changed

layers/tideways/Dockerfile

+7-10
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,18 @@
11
# syntax = docker/dockerfile:1.4
22
ARG PHP_VERSION
33
ARG BREF_VERSION
4+
ARG TIDEWAYS_VERSION=5.18.6
5+
6+
FROM ghcr.io/tideways/php:$TIDEWAYS_VERSION AS tideways
47
FROM bref/build-php-$PHP_VERSION:$BREF_VERSION AS ext
58

6-
ARG TIDEWAYS_VERSION=5.18.6
79
# Versions: https://tideways.com/profiler/downloads
810
# Docs: https://app.tideways.io/o/Bref/Bref-Tideways/installation
911

10-
RUN <<'END' bash -e
11-
mkdir -p /tmp/tideways
12-
cd /tmp/tideways
13-
export version=$(php -r "echo PHP_MAJOR_VERSION.'.'.PHP_MINOR_VERSION;")
14-
curl -sSL "https://s3-eu-west-1.amazonaws.com/tideways/extension/${TIDEWAYS_VERSION}/tideways-php-${TIDEWAYS_VERSION}-x86_64.tar.gz" | tar -xz --strip-components=1 -C /tmp/tideways
15-
cp /tmp/tideways/tideways-php-${version}.so /tmp/tideways.so
16-
echo 'extension=tideways.so' > /tmp/ext-tideways.ini
17-
END
18-
12+
COPY --from=tideways /tideways/ /tideways/
13+
RUN set -ex; \
14+
cp "$(php /tideways/get-ext-path.php)" /tmp/tideways.so; \
15+
echo "extension=tideways.so" > /tmp/ext-tideways.ini;
1916

2017
# Build the final image with just the files we need
2118
FROM scratch

0 commit comments

Comments
 (0)