← Back to team overview

wordpress-charmers team mailing list archive

[Merge] ~mthaddon/charm-k8s-wordpress/+git/wordpress-k8s-image-builder:pkg-ordering into ~wordpress-charmers/charm-k8s-wordpress/+git/wordpress-k8s-image-builder:master

 

Tom Haddon has proposed merging ~mthaddon/charm-k8s-wordpress/+git/wordpress-k8s-image-builder:pkg-ordering into ~wordpress-charmers/charm-k8s-wordpress/+git/wordpress-k8s-image-builder:master.

Commit message:
Move docker package dependencies to an alpha sorted list in the Makefile for easier reading



Requested reviews:
  Wordpress Charmers (wordpress-charmers)

For more details, see:
https://code.launchpad.net/~mthaddon/charm-k8s-wordpress/+git/wordpress-k8s-image-builder/+merge/382832

Move docker package dependencies to an alpha sorted list in the Makefile for easier reading


-- 
Your team Wordpress Charmers is requested to review the proposed merge of ~mthaddon/charm-k8s-wordpress/+git/wordpress-k8s-image-builder:pkg-ordering into ~wordpress-charmers/charm-k8s-wordpress/+git/wordpress-k8s-image-builder:master.
diff --git a/Dockerfile b/Dockerfile
index b2d507a..d060357 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -1,4 +1,5 @@
 ARG DIST_RELEASE
+ARG DOCKER_DEPS
 
 FROM ubuntu:${DIST_RELEASE}
 
@@ -19,8 +20,7 @@ RUN echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selectio
 # Update all packages, remove cruft, install required packages, configure apache
 RUN apt-get update && apt-get -y dist-upgrade \
     && apt-get --purge autoremove -y \
-    && apt-get install -y apache2 curl libapache2-mod-php php php-curl php-gd php-gmp php-mysql \
-       php-symfony-yaml php-xml pwgen python3 python3-yaml ssl-cert libgmp-dev \
+    && apt-get install -y ${DOCKER_DEPS}
     && sed -ri 's/^export ([^=]+)=(.*)$/: ${\1:=\2}\nexport \1/' "$APACHE_ENVVARS" \
     && . "$APACHE_ENVVARS" \
     && for dir in "$APACHE_LOCK_DIR" "$APACHE_RUN_DIR" "$APACHE_LOG_DIR"; do rm -rvf "$dir"; mkdir -p "$dir"; chown "$APACHE_RUN_USER:$APACHE_RUN_GROUP" "$dir"; chmod 777 "$dir";  done \
diff --git a/Makefile b/Makefile
index a3cddc9..78c32a3 100644
--- a/Makefile
+++ b/Makefile
@@ -1,4 +1,20 @@
 DIST_RELEASE ?= bionic
+DOCKER_DEPS = \
+	apache2 \
+	curl \
+	libapache2-mod-php \
+	libgmp-dev \
+	php \
+	php-curl \
+	php-gd \
+	php-gmp \
+	php-mysql \
+	php-symfony-yaml \
+	php-xml \
+	pwgen \
+	python3 \
+	python3-yaml \
+	ssl-cert
 
 build: lint deps
 	@echo "Fetching plugins and themes."
@@ -7,6 +23,7 @@ build: lint deps
 	@docker build \
 		--no-cache=true \
 		--build-arg BUILD_DATE=$(date -u +'%Y-%m-%dT%H:%M:%SZ') \
+		--build-arg DOCKER_DEPS=$(DOCKER_DEPS) \
 		--build-arg DIST_RELEASE=$(DIST_RELEASE) \
 		--build-arg HTTPS_PROXY=$(HTTPS_PROXY) \
 		-t wordpress:$(DIST_RELEASE)-latest \

Follow ups