Skip to content

Commit 3e353f1

Browse files
fix(docker): chain net-imap removal into the install layer
Address review feedback: a separate RUN leaves the gem in the earlier layer, so remove it in the same RUN as the dependency install. Signed-off-by: noahwithoutark22 <yash.dubey.ece24@iitbhu.ac.in>
1 parent bf66d20 commit 3e353f1

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

‎docker/Dockerfile.dev‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,14 @@ RUN sh /tmp/setup_compiler_wrappers.sh && rm /tmp/setup_compiler_wrappers.sh
2323

2424
ENV PATH="/usr/local/bin/wrapped-cc:$PATH"
2525

26+
# The last rm drops the unused net-imap default gem bundled with Ubuntu 22.04's
27+
# Ruby 3.0 (flagged by CVE scanners, never used by the flow). It is chained here
28+
# so the files don't persist in an earlier layer. No-op if not present.
2629
RUN ./DependencyInstaller.sh -base $options $constantBuildDir -save-deps-prefixes=/etc/openroad_deps_prefixes.txt \
2730
&& ./DependencyInstaller.sh -common $options $constantBuildDir -save-deps-prefixes=/etc/openroad_deps_prefixes.txt \
28-
&& rm -rf /tmp/installer /tmp/* /var/tmp/* /var/lib/apt/lists/*
29-
30-
# Remove the unused net-imap default gem bundled with Ubuntu 22.04's Ruby 3.0
31-
# (flagged by CVE scanners; never used by the flow). No-op if not present.
32-
RUN rm -rf /usr/lib/ruby/gems/*/gems/net-imap-0.1.1 \
33-
/usr/lib/ruby/gems/*/specifications/default/net-imap-0.1.1.gemspec
31+
&& rm -rf /tmp/installer /tmp/* /var/tmp/* /var/lib/apt/lists/* \
32+
&& rm -rf /usr/lib/ruby/gems/*/gems/net-imap-0.1.1 \
33+
/usr/lib/ruby/gems/*/specifications/default/net-imap-0.1.1.gemspec
3434

3535
ARG fromImage
3636

0 commit comments

Comments
 (0)