-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathDockerfile
More file actions
32 lines (21 loc) · 1.13 KB
/
Dockerfile
File metadata and controls
32 lines (21 loc) · 1.13 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
FROM php:8.5.3-cli-bookworm@sha256:668a03651e62e1ba9a2fe06147bbfb6afa35d79468e63eb98357915c16524d29 AS base
COPY --from=composer:2.8.5 /usr/bin/composer /usr/bin/composer
ADD --chmod=0755 https://github.com/mlocati/docker-php-extension-installer/releases/download/2.7.14/install-php-extensions /usr/local/bin/
RUN apt update && apt install -y bash git gpg postgresql-client vim zip
RUN install-php-extensions pdo pdo_pgsql zip intl redis
COPY ./docker/cli/php.ini /usr/local/etc/php/php.ini
RUN curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg \
&& echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_22.x nodistro main" > /etc/apt/sources.list.d/nodesource.list \
&& apt update \
&& apt install -y nodejs \
&& npm install -g yarn
RUN groupadd --gid 100000 app \
&& useradd --uid 100000 --gid 100000 --create-home --shell /bin/bash app
WORKDIR /app
################
FROM base AS dev
RUN install-php-extensions xdebug
USER app
################
# FROM base AS prod
# The cli container is strictly for dev at this time.