Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SC-15298 Support Alpine 3.18 #77

Merged
merged 9 commits into from
Aug 30, 2023
Merged
Show file tree
Hide file tree
Changes from 7 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,15 @@ jobs:
tags: [ "spryker/php:8.1", "spryker/php:8.1-alpine3.17" ]
platforms: [ "linux/amd64", "linux/arm64" ]
- image: "alpine/3.17/8.2/Dockerfile"
tags: [ "spryker/php:latest", "spryker/php:8.2", "spryker/php:8.2-alpine3.17" ]
tags: [ "spryker/php:8.2", "spryker/php:8.2-alpine3.17" ]
platforms: [ "linux/amd64", "linux/arm64" ]

### Alpine 3.18
- image: "alpine/3.18/8.1/Dockerfile"
tags: [ "spryker/php:8.1", "spryker/php:8.1-alpine3.18" ]
platforms: [ "linux/amd64", "linux/arm64" ]
- image: "alpine/3.18/8.2/Dockerfile"
tags: [ "spryker/php:latest", "spryker/php:8.2", "spryker/php:8.2-alpine3.18" ]
platforms: [ "linux/amd64", "linux/arm64" ]

## Debian
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
.idea
utils.sh
15 changes: 9 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ Extends official PHP Docker images with extensions and tools to be able to run S
* `Alpine 3.15`
* `Alpine 3.16`
* `Alpine 3.17`
* `Alpine 3.18`
* `Debian "bullseye"`

* Users: `root`, `spryker`
Expand All @@ -29,10 +30,12 @@ Extends official PHP Docker images with extensions and tools to be able to run S

| Tag | PHP version | Linux distribution | Details | Dockerfile |
|:--------------------------------------------------------------------------------------------|:------------|:-------------------|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:-------------------------------------------------------------------------------------------|
| [spryker/php:latest](https://hub.docker.com/r/spryker/php/tags?name=latest) | 8.2.5 | Alpine 3.17 | [![](https://images.microbadger.com/badges/image/spryker/php:latest.svg)](https://microbadger.com/images/spryker/php:latest "Get your own image badge on microbadger.com") | [:link:](https://github.com/spryker/docker-php/blob/master/alpine/3.17/8.2/Dockerfile) |
| [spryker/php:8.2](https://hub.docker.com/r/spryker/php/tags?name=8.2) | 8.2.5 | Alpine 3.17 | [![](https://images.microbadger.com/badges/image/spryker/php:8.2.svg)](https://microbadger.com/images/spryker/php:8.2 "Get your own image badge on microbadger.com") | [:link:](https://github.com/spryker/docker-php/blob/master/alpine/3.17/8.2/Dockerfile) |
| [spryker/php:8.1](https://hub.docker.com/r/spryker/php/tags?name=8.1) | 8.1.18 | Alpine 3.17 | [![](https://images.microbadger.com/badges/image/spryker/php:8.1.svg)](https://microbadger.com/images/spryker/php:8.1 "Get your own image badge on microbadger.com") | [:link:](https://github.com/spryker/docker-php/blob/master/alpine/3.17/8.1/Dockerfile) |
| [spryker/php:latest](https://hub.docker.com/r/spryker/php/tags?name=latest) | 8.2.8 | Alpine 3.18 | [![](https://images.microbadger.com/badges/image/spryker/php:latest.svg)](https://microbadger.com/images/spryker/php:latest "Get your own image badge on microbadger.com") | [:link:](https://github.com/spryker/docker-php/blob/master/alpine/3.18/8.2/Dockerfile) |
| [spryker/php:8.2](https://hub.docker.com/r/spryker/php/tags?name=8.2) | 8.2.8 | Alpine 3.18 | [![](https://images.microbadger.com/badges/image/spryker/php:8.2.svg)](https://microbadger.com/images/spryker/php:8.2 "Get your own image badge on microbadger.com") | [:link:](https://github.com/spryker/docker-php/blob/master/alpine/3.18/8.2/Dockerfile) |
| [spryker/php:8.1](https://hub.docker.com/r/spryker/php/tags?name=8.1) | 8.1.22 | Alpine 3.18 | [![](https://images.microbadger.com/badges/image/spryker/php:8.1.svg)](https://microbadger.com/images/spryker/php:8.1 "Get your own image badge on microbadger.com") | [:link:](https://github.com/spryker/docker-php/blob/master/alpine/3.18/8.1/Dockerfile) |
| [spryker/php:8.0](https://hub.docker.com/r/spryker/php/tags?name=8.0) | 8.0.28 | Alpine 3.16 | [![](https://images.microbadger.com/badges/image/spryker/php:8.0.svg)](https://microbadger.com/images/spryker/php:8.0 "Get your own image badge on microbadger.com") | [:link:](https://github.com/spryker/docker-php/blob/master/alpine/3.16/8.0/Dockerfile) |
| [spryker/php:8.2-alpine3.18](https://hub.docker.com/r/spryker/php/tags?name=8.2-alpine3.18) | 8.2.8 | Alpine 3.18 | [![](https://images.microbadger.com/badges/image/spryker/php:8.2-alpine3.18.svg)](https://microbadger.com/images/spryker/php:8.2-alpine3.18 "Get your own image badge on microbadger.com") | [:link:](https://github.com/spryker/docker-php/blob/master/alpine/3.18/8.2/Dockerfile) |
| [spryker/php:8.1-alpine3.18](https://hub.docker.com/r/spryker/php/tags?name=8.1-alpine3.18) | 8.1.22 | Alpine 3.18 | [![](https://images.microbadger.com/badges/image/spryker/php:8.1-alpine3.18.svg)](https://microbadger.com/images/spryker/php:8.1-alpine3.18 "Get your own image badge on microbadger.com") | [:link:](https://github.com/spryker/docker-php/blob/master/alpine/3.18/8.1/Dockerfile) |
| [spryker/php:8.2-alpine3.17](https://hub.docker.com/r/spryker/php/tags?name=8.2-alpine3.17) | 8.2.5 | Alpine 3.17 | [![](https://images.microbadger.com/badges/image/spryker/php:8.2-alpine3.17.svg)](https://microbadger.com/images/spryker/php:8.2-alpine3.17 "Get your own image badge on microbadger.com") | [:link:](https://github.com/spryker/docker-php/blob/master/alpine/3.17/8.2/Dockerfile) |
| [spryker/php:8.1-alpine3.17](https://hub.docker.com/r/spryker/php/tags?name=8.1-alpine3.17) | 8.1.18 | Alpine 3.17 | [![](https://images.microbadger.com/badges/image/spryker/php:8.1-alpine3.17.svg)](https://microbadger.com/images/spryker/php:8.1-alpine3.17 "Get your own image badge on microbadger.com") | [:link:](https://github.com/spryker/docker-php/blob/master/alpine/3.16/8.1/Dockerfile) |
| [spryker/php:8.2-alpine3.16](https://hub.docker.com/r/spryker/php/tags?name=8.2-alpine3.16) | 8.2.5 | Alpine 3.16 | [![](https://images.microbadger.com/badges/image/spryker/php:8.2-alpine3.16.svg)](https://microbadger.com/images/spryker/php:8.2-alpine3.16 "Get your own image badge on microbadger.com") | [:link:](https://github.com/spryker/docker-php/blob/master/alpine/3.16/8.2/Dockerfile) |
Expand Down Expand Up @@ -170,8 +173,8 @@ Installed extensions

Disabled extensions
====================
[ ] blackfire 1.86.4~linux-x64-non_zts82
[ ] newrelic 10.9.0.324
[ ] blackfire 1.87.1
[ ] newrelic 10.11.0.3
[ ] pcov 1.0.11
[ ] tideways 5.5.14
[ ] xhprof 2.3.9
Expand All @@ -182,7 +185,7 @@ PACKAGE VERSION STATE
apcu 5.1.22 stable
pcov 1.0.11 stable
redis 5.3.7 stable
xdebug 3.2.1 stable
xdebug 3.2.2 stable
xhprof 2.3.9 stable

Composer
Expand Down
19 changes: 4 additions & 15 deletions alpine/3.15/8.0/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,16 +1,13 @@
# syntax = docker/dockerfile:1.0.2-experimental
ARG SPRYKER_PHP_VERSION=8.0.26
ARG NEWRELIC_VERSION=10.6.0.318

FROM spryker/newrelic-extension:${NEWRELIC_VERSION}-php8.0 as spyker-newrelic-arm

FROM php:${SPRYKER_PHP_VERSION}-fpm-alpine3.15

ARG TARGETPLATFORM
ARG COMPOSER_VERSION=2.5.5
ARG BLACKFIRE_VERSION=1.87.1
ARG BLACKFIRE_PHP_VERSION=80
ARG NEWRELIC_VERSION=10.6.0.318
ARG NEWRELIC_VERSION=10.11.0.3
ARG TIDEWAYS_VERSION=5.5.8
ARG TIDEWAYS_PHP_VERSION=8.0

Expand Down Expand Up @@ -87,7 +84,7 @@ RUN apk update \
mysql-client \
netcat-openbsd \
openssh \
openssl=1.1.1t-r3 \
openssl \
postgresql-client \
procps \
python3 \
Expand Down Expand Up @@ -131,22 +128,14 @@ ENV NEWRELIC_SPAN_EVENTS_ENABLED=0
ENV NEWRELIC_TRANSACTION_TRACER_THRESHOLD=0
ENV NEWRELIC_DISTRIBUTED_TRACING_EXCLUDE_NEWRELIC_HEADER=0

RUN bash -c 'if [ "${TARGETPLATFORM}" == "linux/amd64" ]; then \
curl -L "https://download.newrelic.com/php_agent/archive/${NEWRELIC_VERSION}/newrelic-php5-${NEWRELIC_VERSION}-linux-musl.tar.gz" | tar -C /tmp -zx \
RUN bash -c 'curl -L "https://download.newrelic.com/php_agent/archive/${NEWRELIC_VERSION}/newrelic-php5-${NEWRELIC_VERSION}-linux-musl.tar.gz" | tar -C /tmp -zx \
&& export NR_INSTALL_USE_CP_NOT_LN=1 \
&& export NR_INSTALL_SILENT=1 \
&& /tmp/newrelic-php5-*/newrelic-install install \
&& rm -rf /tmp/newrelic-php5-* /tmp/nrinstall* \
&& /usr/bin/install -d -m 777 /var/log/newrelic/ \
&& rm /usr/local/etc/php/conf.d/newrelic.ini \
&& ln -s /lib64/ld-linux-x86-64.so.2 /lib/ld-linux-x86-64.so.2; fi'

COPY --from=spyker-newrelic-arm /newrelic.so /tmp/newrelic.so
COPY --from=spyker-newrelic-arm /newrelic-daemon /tmp/newrelic-daemon

RUN bash -c 'if [ "${TARGETPLATFORM}" == "linux/arm64" ]; then \
cp /tmp/newrelic.so $(php-config --extension-dir)/newrelic.so \
&& cp /tmp/newrelic-daemon /usr/bin/newrelic-daemon; fi'
&& ln -s /lib64/ld-linux-x86-64.so.2 /lib/ld-linux-x86-64.so.2'

# Tideways
ENV TIDEWAYS_APIKEY=''
Expand Down
19 changes: 4 additions & 15 deletions alpine/3.15/8.1/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,16 +1,13 @@
# syntax = docker/dockerfile:1.0.2-experimental
ARG SPRYKER_PHP_VERSION=8.1.13
ARG NEWRELIC_VERSION=10.6.0.318

FROM spryker/newrelic-extension:${NEWRELIC_VERSION}-php8.1 as spyker-newrelic-arm

FROM php:${SPRYKER_PHP_VERSION}-fpm-alpine3.15

ARG TARGETPLATFORM
ARG COMPOSER_VERSION=2.5.5
ARG BLACKFIRE_VERSION=1.87.1
ARG BLACKFIRE_PHP_VERSION=81
ARG NEWRELIC_VERSION=10.6.0.318
ARG NEWRELIC_VERSION=10.11.0.3
ARG TIDEWAYS_VERSION=5.5.8
ARG TIDEWAYS_PHP_VERSION=8.1

Expand Down Expand Up @@ -87,7 +84,7 @@ RUN apk update \
mysql-client \
netcat-openbsd \
openssh \
openssl=1.1.1t-r3 \
openssl \
postgresql-client \
procps \
python3 \
Expand Down Expand Up @@ -130,22 +127,14 @@ ENV NEWRELIC_SPAN_EVENTS_ENABLED=0
ENV NEWRELIC_TRANSACTION_TRACER_THRESHOLD=0
ENV NEWRELIC_DISTRIBUTED_TRACING_EXCLUDE_NEWRELIC_HEADER=0

RUN bash -c 'if [ "${TARGETPLATFORM}" == "linux/amd64" ]; then \
curl -L "https://download.newrelic.com/php_agent/archive/${NEWRELIC_VERSION}/newrelic-php5-${NEWRELIC_VERSION}-linux-musl.tar.gz" | tar -C /tmp -zx \
RUN bash -c 'curl -L "https://download.newrelic.com/php_agent/archive/${NEWRELIC_VERSION}/newrelic-php5-${NEWRELIC_VERSION}-linux-musl.tar.gz" | tar -C /tmp -zx \
&& export NR_INSTALL_USE_CP_NOT_LN=1 \
&& export NR_INSTALL_SILENT=1 \
&& /tmp/newrelic-php5-*/newrelic-install install \
&& rm -rf /tmp/newrelic-php5-* /tmp/nrinstall* \
&& /usr/bin/install -d -m 777 /var/log/newrelic/ \
&& rm /usr/local/etc/php/conf.d/newrelic.ini \
&& ln -s /lib64/ld-linux-x86-64.so.2 /lib/ld-linux-x86-64.so.2; fi'

COPY --from=spyker-newrelic-arm /newrelic.so /tmp/newrelic.so
COPY --from=spyker-newrelic-arm /newrelic-daemon /tmp/newrelic-daemon

RUN bash -c 'if [ "${TARGETPLATFORM}" == "linux/arm64" ]; then \
cp /tmp/newrelic.so $(php-config --extension-dir)/newrelic.so \
&& cp /tmp/newrelic-daemon /usr/bin/newrelic-daemon; fi'
&& ln -s /lib64/ld-linux-x86-64.so.2 /lib/ld-linux-x86-64.so.2'

# Tideways
ENV TIDEWAYS_APIKEY=''
Expand Down
18 changes: 4 additions & 14 deletions alpine/3.16/8.0/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,13 @@
ARG SPRYKER_PHP_VERSION=8.0.28
ARG NEWRELIC_VERSION=10.6.0.318

FROM spryker/newrelic-extension:${NEWRELIC_VERSION}-php8.0 as spyker-newrelic-arm

FROM php:${SPRYKER_PHP_VERSION}-fpm-alpine3.16

ARG TARGETPLATFORM
ARG COMPOSER_VERSION=2.5.5
ARG BLACKFIRE_VERSION=1.87.1
ARG BLACKFIRE_PHP_VERSION=80
ARG NEWRELIC_VERSION=10.6.0.318
ARG NEWRELIC_VERSION=10.11.0.3
ARG TIDEWAYS_VERSION=5.5.8
ARG TIDEWAYS_PHP_VERSION=8.0

Expand Down Expand Up @@ -88,7 +86,7 @@ RUN apk update \
mysql-client \
netcat-openbsd \
openssh \
openssl=1.1.1t-r2 \
openssl \
postgresql-client \
procps \
python3 \
Expand Down Expand Up @@ -131,22 +129,14 @@ ENV NEWRELIC_SPAN_EVENTS_ENABLED=0
ENV NEWRELIC_TRANSACTION_TRACER_THRESHOLD=0
ENV NEWRELIC_DISTRIBUTED_TRACING_EXCLUDE_NEWRELIC_HEADER=0

RUN bash -c 'if [ "${TARGETPLATFORM}" == "linux/amd64" ]; then \
curl -L "https://download.newrelic.com/php_agent/archive/${NEWRELIC_VERSION}/newrelic-php5-${NEWRELIC_VERSION}-linux-musl.tar.gz" | tar -C /tmp -zx \
RUN bash -c 'curl -L "https://download.newrelic.com/php_agent/archive/${NEWRELIC_VERSION}/newrelic-php5-${NEWRELIC_VERSION}-linux-musl.tar.gz" | tar -C /tmp -zx \
&& export NR_INSTALL_USE_CP_NOT_LN=1 \
&& export NR_INSTALL_SILENT=1 \
&& /tmp/newrelic-php5-*/newrelic-install install \
&& rm -rf /tmp/newrelic-php5-* /tmp/nrinstall* \
&& /usr/bin/install -d -m 777 /var/log/newrelic/ \
&& rm /usr/local/etc/php/conf.d/newrelic.ini \
&& ln -s /lib64/ld-linux-x86-64.so.2 /lib/ld-linux-x86-64.so.2; fi'

COPY --from=spyker-newrelic-arm /newrelic.so /tmp/newrelic.so
COPY --from=spyker-newrelic-arm /newrelic-daemon /tmp/newrelic-daemon

RUN bash -c 'if [ "${TARGETPLATFORM}" == "linux/arm64" ]; then \
cp /tmp/newrelic.so $(php-config --extension-dir)/newrelic.so \
&& cp /tmp/newrelic-daemon /usr/bin/newrelic-daemon; fi'
&& ln -s /lib64/ld-linux-x86-64.so.2 /lib/ld-linux-x86-64.so.2'

# Tideways
ENV TIDEWAYS_APIKEY=''
Expand Down
18 changes: 4 additions & 14 deletions alpine/3.16/8.1/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,13 @@
ARG SPRYKER_PHP_VERSION=8.1.18
ARG NEWRELIC_VERSION=10.6.0.318

FROM spryker/newrelic-extension:${NEWRELIC_VERSION}-php8.1 as spyker-newrelic-arm

FROM php:${SPRYKER_PHP_VERSION}-fpm-alpine3.16

ARG TARGETPLATFORM
ARG COMPOSER_VERSION=2.5.5
ARG BLACKFIRE_VERSION=1.87.1
ARG BLACKFIRE_PHP_VERSION=81
ARG NEWRELIC_VERSION=10.6.0.318
ARG NEWRELIC_VERSION=10.11.0.3
ARG TIDEWAYS_VERSION=5.5.8
ARG TIDEWAYS_PHP_VERSION=8.1

Expand Down Expand Up @@ -88,7 +86,7 @@ RUN apk update \
mysql-client \
netcat-openbsd \
openssh \
openssl=1.1.1t-r2 \
openssl \
postgresql-client \
procps \
python3 \
Expand Down Expand Up @@ -131,22 +129,14 @@ ENV NEWRELIC_SPAN_EVENTS_ENABLED=0
ENV NEWRELIC_TRANSACTION_TRACER_THRESHOLD=0
ENV NEWRELIC_DISTRIBUTED_TRACING_EXCLUDE_NEWRELIC_HEADER=0

RUN bash -c 'if [ "${TARGETPLATFORM}" == "linux/amd64" ]; then \
curl -L "https://download.newrelic.com/php_agent/archive/${NEWRELIC_VERSION}/newrelic-php5-${NEWRELIC_VERSION}-linux-musl.tar.gz" | tar -C /tmp -zx \
RUN bash -c 'curl -L "https://download.newrelic.com/php_agent/archive/${NEWRELIC_VERSION}/newrelic-php5-${NEWRELIC_VERSION}-linux-musl.tar.gz" | tar -C /tmp -zx \
&& export NR_INSTALL_USE_CP_NOT_LN=1 \
&& export NR_INSTALL_SILENT=1 \
&& /tmp/newrelic-php5-*/newrelic-install install \
&& rm -rf /tmp/newrelic-php5-* /tmp/nrinstall* \
&& /usr/bin/install -d -m 777 /var/log/newrelic/ \
&& rm /usr/local/etc/php/conf.d/newrelic.ini \
&& ln -s /lib64/ld-linux-x86-64.so.2 /lib/ld-linux-x86-64.so.2; fi'

COPY --from=spyker-newrelic-arm /newrelic.so /tmp/newrelic.so
COPY --from=spyker-newrelic-arm /newrelic-daemon /tmp/newrelic-daemon

RUN bash -c 'if [ "${TARGETPLATFORM}" == "linux/arm64" ]; then \
cp /tmp/newrelic.so $(php-config --extension-dir)/newrelic.so \
&& cp /tmp/newrelic-daemon /usr/bin/newrelic-daemon; fi'
&& ln -s /lib64/ld-linux-x86-64.so.2 /lib/ld-linux-x86-64.so.2'

# Tideways
ENV TIDEWAYS_APIKEY=''
Expand Down
16 changes: 3 additions & 13 deletions alpine/3.16/8.2/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
# syntax = docker/dockerfile:1.0.2-experimental
ARG SPRYKER_PHP_VERSION=8.2.5

FROM spryker/newrelic-extension:10.9.0.324-php8.2 as spyker-newrelic-arm

FROM php:${SPRYKER_PHP_VERSION}-fpm-alpine3.16

ARG TARGETPLATFORM
ARG COMPOSER_VERSION=2.5.5
ARG BLACKFIRE_VERSION=1.87.1
ARG BLACKFIRE_PHP_VERSION=82
ARG NEWRELIC_VERSION=10.9.0.324
ARG NEWRELIC_VERSION=10.11.0.3
ARG TIDEWAYS_VERSION=5.5.14
ARG TIDEWAYS_PHP_VERSION=8.2

Expand Down Expand Up @@ -129,22 +127,14 @@ ENV NEWRELIC_SPAN_EVENTS_ENABLED=0
ENV NEWRELIC_TRANSACTION_TRACER_THRESHOLD=0
ENV NEWRELIC_DISTRIBUTED_TRACING_EXCLUDE_NEWRELIC_HEADER=0

RUN bash -c 'if [ "${TARGETPLATFORM}" == "linux/amd64" ]; then \
curl -L "https://download.newrelic.com/php_agent/archive/${NEWRELIC_VERSION}/newrelic-php5-${NEWRELIC_VERSION}-linux-musl.tar.gz" | tar -C /tmp -zx \
RUN bash -c 'curl -L "https://download.newrelic.com/php_agent/archive/${NEWRELIC_VERSION}/newrelic-php5-${NEWRELIC_VERSION}-linux-musl.tar.gz" | tar -C /tmp -zx \
&& export NR_INSTALL_USE_CP_NOT_LN=1 \
&& export NR_INSTALL_SILENT=1 \
&& /tmp/newrelic-php5-*/newrelic-install install \
&& rm -rf /tmp/newrelic-php5-* /tmp/nrinstall* \
&& /usr/bin/install -d -m 777 /var/log/newrelic/ \
&& rm /usr/local/etc/php/conf.d/newrelic.ini \
&& ln -s /lib64/ld-linux-x86-64.so.2 /lib/ld-linux-x86-64.so.2; fi'

COPY --from=spyker-newrelic-arm /newrelic.so /tmp/newrelic.so
COPY --from=spyker-newrelic-arm /newrelic-daemon /tmp/newrelic-daemon

RUN bash -c 'if [ "${TARGETPLATFORM}" == "linux/arm64" ]; then \
cp /tmp/newrelic.so $(php-config --extension-dir)/newrelic.so \
&& cp /tmp/newrelic-daemon /usr/bin/newrelic-daemon; fi'
&& ln -s /lib64/ld-linux-x86-64.so.2 /lib/ld-linux-x86-64.so.2'

# Tideways
ENV TIDEWAYS_APIKEY=''
Expand Down
16 changes: 3 additions & 13 deletions alpine/3.17/8.1/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
# syntax = docker/dockerfile:1.0.2-experimental
ARG SPRYKER_PHP_VERSION=8.1.18

FROM spryker/newrelic-extension:10.6.0.318-php8.1 as spyker-newrelic-arm

FROM php:${SPRYKER_PHP_VERSION}-fpm-alpine3.17

ARG TARGETPLATFORM
ARG COMPOSER_VERSION=2.5.5
ARG BLACKFIRE_VERSION=1.87.1
ARG BLACKFIRE_PHP_VERSION=81
ARG NEWRELIC_VERSION=10.9.0.324
ARG NEWRELIC_VERSION=10.11.0.3
ARG TIDEWAYS_VERSION=5.5.14
ARG TIDEWAYS_PHP_VERSION=8.1

Expand Down Expand Up @@ -129,22 +127,14 @@ ENV NEWRELIC_SPAN_EVENTS_ENABLED=0
ENV NEWRELIC_TRANSACTION_TRACER_THRESHOLD=0
ENV NEWRELIC_DISTRIBUTED_TRACING_EXCLUDE_NEWRELIC_HEADER=0

RUN bash -c 'if [ "${TARGETPLATFORM}" == "linux/amd64" ]; then \
curl -L "https://download.newrelic.com/php_agent/archive/${NEWRELIC_VERSION}/newrelic-php5-${NEWRELIC_VERSION}-linux-musl.tar.gz" | tar -C /tmp -zx \
RUN bash -c 'curl -L "https://download.newrelic.com/php_agent/archive/${NEWRELIC_VERSION}/newrelic-php5-${NEWRELIC_VERSION}-linux-musl.tar.gz" | tar -C /tmp -zx \
&& export NR_INSTALL_USE_CP_NOT_LN=1 \
&& export NR_INSTALL_SILENT=1 \
&& /tmp/newrelic-php5-*/newrelic-install install \
&& rm -rf /tmp/newrelic-php5-* /tmp/nrinstall* \
&& /usr/bin/install -d -m 777 /var/log/newrelic/ \
&& rm /usr/local/etc/php/conf.d/newrelic.ini \
&& ln -s /lib64/ld-linux-x86-64.so.2 /lib/ld-linux-x86-64.so.2; fi'

COPY --from=spyker-newrelic-arm /newrelic.so /tmp/newrelic.so
COPY --from=spyker-newrelic-arm /newrelic-daemon /tmp/newrelic-daemon

RUN bash -c 'if [ "${TARGETPLATFORM}" == "linux/arm64" ]; then \
cp /tmp/newrelic.so $(php-config --extension-dir)/newrelic.so \
&& cp /tmp/newrelic-daemon /usr/bin/newrelic-daemon; fi'
&& ln -s /lib64/ld-linux-x86-64.so.2 /lib/ld-linux-x86-64.so.2'

# Tideways
ENV TIDEWAYS_APIKEY=''
Expand Down
Loading