From 8b905b41fc9205261ef409da478fea2606cac924 Mon Sep 17 00:00:00 2001 From: Mark Beacom Date: Thu, 20 Jun 2019 10:28:31 -0400 Subject: [PATCH] Adjust make procedures and py38 docker --- Dockerfile-py38 | 4 ++++ Makefile | 23 ++++++++++++++++++++++- 2 files changed, 26 insertions(+), 1 deletion(-) diff --git a/Dockerfile-py38 b/Dockerfile-py38 index a62309bb0..315e7fd54 100644 --- a/Dockerfile-py38 +++ b/Dockerfile-py38 @@ -9,3 +9,7 @@ RUN apt-get -qq update && \ RUN pip install --upgrade pip && \ pip install --upgrade wheel setuptools twine pipenv && \ pipenv install --dev --system --deploy + +RUN apt-get clean autoclean && \ + apt-get autoremove --yes && \ + rm -rf /var/lib/{apt,dpkg,cache,log}/ diff --git a/Makefile b/Makefile index 65de43429..a81122205 100644 --- a/Makefile +++ b/Makefile @@ -3,13 +3,34 @@ .PHONY: help -REPO_NAME := mbeacom/cloudendure-py +REPO_NAME := mbeacom/cloudendure-python SHA1 := $$(git log -1 --pretty=%h) CURRENT_BRANCH := $$(git symbolic-ref -q --short HEAD) info: ## Show information about the current git state. @echo "Github Project: https://github.com/${REPO_NAME}\nCurrent Branch: ${CURRENT_BRANCH}\nSHA1: ${SHA1}\n" +build: ## Build the Gitcoin Web image. + @docker build \ + --stream \ + --pull \ + --build-arg BUILD_DATETIME=`date -u +"%Y-%m-%dT%H:%M:%SZ"` \ + --build-arg "SHA1=${SHA1}" \ + ${VERSION:+--build-arg "VERSION=$VERSION"} \ + -t "${GIT_TAG}" . + @docker tag "${GIT_TAG}" "${LATEST_TAG}" + +login: ## Login to Docker Hub. + @docker log -u "${DOCKER_USER}" -p "${DOCKER_PASS}" + +push: ## Push the Docker image to the Docker Hub repository. + @docker push "${REPO_NAME}" + +docker: ## Build and publish Docker images. + @docker build -t cloudendure . + @docker tag cloudendure mbeacom/cloudendure-python + @docker push + update_prereqs: ## Update the local development pre-requisite packages. @pip install --upgrade pipenv wheel setuptools pip