Skip to content

Commit

Permalink
Clean up each layer
Browse files Browse the repository at this point in the history
  • Loading branch information
kraftbj committed Jan 24, 2025
1 parent e9f45e8 commit 35d6957
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions tools/docker/Dockerfile.monorepo
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,9 @@ RUN --mount=type=cache,target=/var/lib/apt/lists/,sharing=private \
"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 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
RUN php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" \
Expand All @@ -61,7 +63,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 @@ -77,6 +81,7 @@ RUN chmod +x /usr/local/bin/monorepo-entrypoint.sh
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 \
&& 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
Expand Down

0 comments on commit 35d6957

Please sign in to comment.