← Back to team overview

wordpress-charmers team mailing list archive

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

 

Barry Price has proposed merging ~barryprice/charm-k8s-wordpress/+git/wordpress-k8s-image-builder:master into ~wordpress-charmers/charm-k8s-wordpress/+git/wordpress-k8s-image-builder:master.

Commit message:
Add maintainer/build date labels, make tags more sensible

Requested reviews:
  Wordpress Charmers (wordpress-charmers)

For more details, see:
https://code.launchpad.net/~barryprice/charm-k8s-wordpress/+git/wordpress-k8s-image-builder/+merge/377851
-- 
Your team Wordpress Charmers is requested to review the proposed merge of ~barryprice/charm-k8s-wordpress/+git/wordpress-k8s-image-builder:master into ~wordpress-charmers/charm-k8s-wordpress/+git/wordpress-k8s-image-builder:master.
diff --git a/Dockerfile b/Dockerfile
index a6bed91..f667d10 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -1,7 +1,11 @@
 FROM ubuntu:bionic
 
-ARG http_proxy
-ARG https_proxy
+LABEL maintainer="wordpress-charmers@xxxxxxxxxxxxxxxxxxx"
+
+ARG HTTPS_PROXY
+ARG BUILD_DATE
+
+LABEL org.label-schema.build-date=$BUILD_DATE
 
 # Avoid interactive prompts
 RUN echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections
diff --git a/Makefile b/Makefile
index d3446e7..bfb8fe8 100644
--- a/Makefile
+++ b/Makefile
@@ -2,10 +2,16 @@ build: lint deps
 	@echo "Fetching plugins and themes."
 	@tox -e fetch
 	@echo "Building the image."
-	@docker build . -t wordpress:latest --build-arg HTTP_PROXY=$(HTTP_PROXY) --build-arg HTTPS_PROXY=$(HTTPS_PROXY)
+	@docker build \
+		--no-cache=true \
+		--build-arg BUILD_DATE=$(date -u +'%Y-%m-%dT%H:%M:%SZ') \
+		--build-arg HTTP_PROXY=$(HTTP_PROXY) \
+		--build-arg HTTPS_PROXY=$(HTTPS_PROXY) \
+		-t wordpress:bionic-latest \
+		.
 	@echo "Pushing to the prod-is-external registry."
-	@docker tag wordpress:latest prod-is-external.docker-registry.canonical.com/wordpress:latest
-	@docker push prod-is-external.docker-registry.canonical.com/wordpress:latest
+	@docker tag wordpress:bionic-latest prod-is-external.docker-registry.canonical.com/wordpress:bionic-latest
+	@docker push prod-is-external.docker-registry.canonical.com/wordpress:bionic-latest
 
 deps:
 	@echo "Checking dependencies are present"

Follow ups