wordpress-charmers team mailing list archive
-
wordpress-charmers team
-
Mailing list archive
-
Message #00042
[Merge] ~mthaddon/charm-k8s-wordpress/+git/wordpress-k8s-image-builder:build-focal 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:build-focal into ~wordpress-charmers/charm-k8s-wordpress/+git/wordpress-k8s-image-builder:master.
Commit message:
Separate out Makefile targets so we can more easily test focal builds, remove unused http_proxy build args
Requested reviews:
Wordpress Charmers (wordpress-charmers)
For more details, see:
https://code.launchpad.net/~mthaddon/charm-k8s-wordpress/+git/wordpress-k8s-image-builder/+merge/377837
Separate out Makefile targets so we can more easily test focal builds, remove unused http_proxy build args.
Need to verify that the http_proxy build-args are unused, which they seem to be by looking at the Dockerfile.
We'll need to update the CI job to do this instead of just "make build" if approved:
make fetch
make build
make publish
--
Your team Wordpress Charmers is requested to review the proposed merge of ~mthaddon/charm-k8s-wordpress/+git/wordpress-k8s-image-builder:build-focal into ~wordpress-charmers/charm-k8s-wordpress/+git/wordpress-k8s-image-builder:master.
diff --git a/Dockerfile b/Dockerfile
index a6bed91..4bb775f 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -1,7 +1,6 @@
-FROM ubuntu:bionic
+ARG dist_release
-ARG http_proxy
-ARG https_proxy
+FROM ubuntu:${dist_release}
# Avoid interactive prompts
RUN echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections
diff --git a/Makefile b/Makefile
index d3446e7..a8abf74 100644
--- a/Makefile
+++ b/Makefile
@@ -1,8 +1,14 @@
-build: lint deps
+DIST_RELEASE ?= bionic
+
+fetch: lint deps
@echo "Fetching plugins and themes."
@tox -e fetch
+
+build:
@echo "Building the image."
- @docker build . -t wordpress:latest --build-arg HTTP_PROXY=$(HTTP_PROXY) --build-arg HTTPS_PROXY=$(HTTPS_PROXY)
+ @docker build . -t wordpress:latest --build-arg dist_release=$(DIST_RELEASE)
+
+publish:
@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
Follow ups