From 5e637bd77c00442889467bb7be0cf5bbebb6a305 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Van=20Der=20Biest?= Date: Fri, 28 Jul 2017 09:53:42 +0200 Subject: [PATCH] Makefile to build docker images --- Makefile | 13 +++++++++++++ README.rst | 3 ++- 2 files changed, 15 insertions(+), 1 deletion(-) create mode 100644 Makefile diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..6cc4605 --- /dev/null +++ b/Makefile @@ -0,0 +1,13 @@ +docker-build-latest: docker-pull-deps + docker build -t carlos-jenkins/python-github-webhooks . + +docker-build-push: docker-build-latest + TAG=$$(date +%Y%m%d%H%M%S) ;\ + docker tag carlos-jenkins/python-github-webhooks:latest carlos-jenkins/python-github-webhooks:$$TAG ; \ + docker push carlos-jenkins/python-github-webhooks:$$TAG ; \ + docker push carlos-jenkins/python-github-webhooks:latest ; \ + +docker-pull-deps: + docker pull python:2.7-alpine + +all: docker-build-latest diff --git a/README.rst b/README.rst index 54bfe66..578e9d3 100644 --- a/README.rst +++ b/README.rst @@ -151,7 +151,8 @@ with the following command: :: git clone http://github.com/carlos-jenkins/python-github-webhooks.git - docker build -t carlos-jenkins/python-github-webhooks python-github-webhooks + cd python-github-webhooks + make docker run -d --name webhooks -p 5000:5000 carlos-jenkins/python-github-webhooks You can also mount volume to setup the ``hooks/`` directory, and the file