From 3c529047add7cfe19e9a93f4827ef53f594a841a Mon Sep 17 00:00:00 2001
From: Michele Alberti <michele.alberti@cea.fr>
Date: Wed, 6 Jul 2022 14:01:50 +0200
Subject: [PATCH] [docker] Add Makefile target for pushing an image to the
 LAISER account on docker hub.

---
 docker/Makefile | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/docker/Makefile b/docker/Makefile
index 4bb4b2dc..4ee02b8d 100644
--- a/docker/Makefile
+++ b/docker/Makefile
@@ -20,13 +20,17 @@
 #                                                                        #
 ##########################################################################
 
-.PHONY: all
+.PHONY: pub push
 
 all: Dockerfile
 	@echo "You may want to consider adding ARGS=--no-cache to force"
 	@echo "Docker to rebuild all layers."
 	docker build . -t laiser/caisar:pub -f $^ --rm
 
+push: all
+	@echo "You may need to execute 'docker login' beforehand."
+	docker push laiser/caisar:pub
+
 Dockerfile: Makefile Dockerfile.template env.template
 	sed 's|@UBUNTU_OPAM_BASE@|ocaml/opam:ubuntu-ocaml-4.13|g' Dockerfile.template | \
 sed 's|@ENV@|$(shell cat env.template)|g' | \
-- 
GitLab