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

Dev Docker: add php ast ext #41288

Merged
merged 4 commits into from
Jan 24, 2025
Merged
Changes from all 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
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 \
kraftbj marked this conversation as resolved.
Show resolved Hide resolved
&& find /var/ -name '*-old' -delete && rm -rf /var/log/dpkg.log /var/log/alternatives.log /var/log/apt/ ~/.launchpadlib
kraftbj marked this conversation as resolved.
Show resolved Hide resolved

# 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
kraftbj marked this conversation as resolved.
Show resolved Hide resolved

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