Tag built images as "latest" too
set -e
version="$(git describe --tags)"
-base_image="splatform/epinio-base:${version}"
-server_image="splatform/epinio-server:${version}"
+base_image="splatform/epinio-base"
+server_image="splatform/epinio-server"
-docker build -t ${base_image} -f images/baseimage-Dockerfile .
-docker push ${base_image}
-docker build -t ${server_image} --build-arg BASE_IMAGE=${base_image} -f images/Dockerfile .
-docker push ${server_image}
+docker build -t "${base_image}:${version}" -t "${base_image}:latest" -f images/baseimage-Dockerfile .
+docker push "${base_image}:${version}"
+docker push "${base_image}:latest"
+docker build -t "${server_image}:${version}" -t "${server_image}:latest" --build-arg BASE_IMAGE=${base_image} -f images/Dockerfile .
+docker push "${server_image}:${version}"
+docker push "${server_image}:latest"
