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

Most debian images has gcc #1528

Closed
firecow opened this issue Jul 8, 2024 · 1 comment
Closed

Most debian images has gcc #1528

firecow opened this issue Jul 8, 2024 · 1 comment

Comments

@firecow
Copy link

firecow commented Jul 8, 2024

dive php:8.3.9-zts-bookworm shows that gcc is added to a layer, causing all debian images to use 125mb extra.

image

Something like this seems to get php building and reduces the image size significantly

Index: Dockerfile-linux.template
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/Dockerfile-linux.template b/Dockerfile-linux.template
--- a/Dockerfile-linux.template	(revision 67bf0a36045d27dfe4f83042c823bb2e0785d15d)
+++ b/Dockerfile-linux.template	(date 1720461001944)
@@ -63,7 +63,6 @@
 RUN set -eux; \
 	apt-get update; \
 	apt-get install -y --no-install-recommends \
-		$PHPIZE_DEPS \
 		ca-certificates \
 		curl \
 		xz-utils \
@@ -262,6 +261,7 @@
 		else
 			# debian packages
 			if env.variant == "apache" then "apache2-dev" else empty end,
+			"$PHPIZE_DEPS",
 			"libargon2-dev",
 			"libcurl4-openssl-dev",
 			"libreadline-dev",
@tianon
Copy link
Member

tianon commented Jul 8, 2024

Duplicate of #438; see discussion there, especially #438 (comment)

@tianon tianon closed this as completed Jul 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants