Skip to content

Commit

Permalink
Dev Docker: add php ast ext (#41288)
Browse files Browse the repository at this point in the history
  • Loading branch information
kraftbj authored Jan 24, 2025
1 parent 32de098 commit 44fea3f
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions tools/docker/Dockerfile.monorepo
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@ WORKDIR /app
RUN --mount=type=cache,target=/var/lib/apt/lists/,sharing=private \
export DEBIAN_FRONTEND=noninteractive \
&& apt-get update \
&& apt-get install -y curl gpg language-pack-en-base software-properties-common ca-certificates \
&& apt-get install -y curl gpg language-pack-en-base ca-certificates \
# Install software-properties-common without recommended packages to avoid Python issues
&& apt-get install -y --no-install-recommends software-properties-common \
&& add-apt-repository ppa:ondrej/php \
&& curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg \
# Add Docker's official GPG key
Expand All @@ -38,14 +40,17 @@ RUN --mount=type=cache,target=/var/lib/apt/lists/,sharing=private \
docker-compose-plugin \
jq \
"php${PHP_VERSION}" \
"php${PHP_VERSION}-ast" \
"php${PHP_VERSION}-cli" \
"php${PHP_VERSION}-curl" \
"php${PHP_VERSION}-dom" \
"php${PHP_VERSION}-mbstring" \
"php${PHP_VERSION}-xml" \
"php${PHP_VERSION}-zip" \
rsync \
&& apt-get remove --purge -y python3-apt \
&& apt-get remove --purge --auto-remove -y gpg software-properties-common \
&& apt-get clean \
&& find /var/ -name '*-old' -delete && rm -rf /var/log/dpkg.log /var/log/alternatives.log /var/log/apt/ ~/.launchpadlib

# Install Composer
Expand All @@ -60,7 +65,9 @@ RUN --mount=type=cache,target=/var/lib/apt/lists/,sharing=private \
&& echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_$N.x nodistro main" > /etc/apt/sources.list.d/nodesource.list \
&& apt-get -q update \
&& VER="$(apt-cache show nodejs | sed -n "/^Version: ${NODE_VERSION}-/ { s/^Version: /=/p; q }" )" \
&& apt-get install -y nodejs$VER
&& apt-get install -y nodejs$VER \
&& apt-get clean \
&& find /var/ -name '*-old' -delete && rm -rf /var/log/dpkg.log /var/log/alternatives.log /var/log/apt/ ~/.launchpadlib

# Install pnpm
RUN npm install --global pnpm@$PNPM_VERSION \
Expand All @@ -75,7 +82,9 @@ RUN chmod +x /usr/local/bin/monorepo-entrypoint.sh
# Set up locale properly
RUN apt-get update && apt-get install -y locales \
&& locale-gen en_US.UTF-8 \
&& update-locale LANG=en_US.UTF-8 LC_ALL=en_US.UTF-8
&& update-locale LANG=en_US.UTF-8 LC_ALL=en_US.UTF-8 \
&& apt-get clean \
&& find /var/ -name '*-old' -delete && rm -rf /var/log/dpkg.log /var/log/alternatives.log /var/log/apt/ ~/.launchpadlib

ENV LANG=en_US.UTF-8
ENV LC_ALL=en_US.UTF-8
Expand Down

0 comments on commit 44fea3f

Please sign in to comment.