Skip to content

Commit 666affe

Browse files
committed
[quote]: replace debian image with latest alpine image
Signed-off-by: Gerard Vanloo <gerard.vanloo@ibm.com>
1 parent e0072e9 commit 666affe

1 file changed

Lines changed: 23 additions & 19 deletions

File tree

src/quote/Dockerfile

Lines changed: 23 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -2,25 +2,13 @@
22
# SPDX-License-Identifier: Apache-2.0
33

44

5-
FROM php:8.3-cli AS base
5+
FROM ghcr.io/mlocati/php-extension-installer:2.7.34 AS installer
66

7-
ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/
8-
RUN chmod +x /usr/local/bin/install-php-extensions \
9-
&& install-php-extensions \
10-
opcache \
11-
pcntl \
12-
protobuf \
13-
opentelemetry
14-
15-
WORKDIR /var/www
16-
CMD ["php", "public/index.php"]
17-
USER www-data
18-
EXPOSE ${QUOTE_PORT}
19-
20-
FROM composer:2.7 AS vendor
7+
FROM composer:2.8.9 AS vendor
218

229
WORKDIR /tmp/
23-
COPY ./src/quote/composer.json .
10+
11+
COPY ./src/quote/composer.json composer.json
2412

2513
RUN composer install \
2614
--ignore-platform-reqs \
@@ -30,6 +18,22 @@ RUN composer install \
3018
--no-dev \
3119
--prefer-dist
3220

33-
FROM base AS final
34-
COPY --from=vendor /tmp/vendor/ ./vendor/
35-
COPY ./src/quote/ /var/www
21+
FROM php:8.4-cli-alpine3.21
22+
23+
COPY --from=installer /usr/bin/install-php-extensions /usr/local/bin/
24+
25+
RUN install-php-extensions opcache pcntl protobuf opentelemetry
26+
27+
WORKDIR /var/www
28+
29+
USER www-data
30+
31+
COPY --from=vendor /tmp/vendor/ vendor/
32+
33+
COPY ./src/quote/app/ app/
34+
COPY ./src/quote/public/ public/
35+
COPY ./src/quote/src/ src/
36+
37+
EXPOSE ${QUOTE_PORT}
38+
39+
CMD ["php", "public/index.php"]

0 commit comments

Comments
 (0)