From 7a6068bec869952e0610ca281b4b07b7737adb1c Mon Sep 17 00:00:00 2001 From: Tom Smith Date: Tue, 9 Feb 2021 10:59:10 -0500 Subject: [PATCH] update dockerfile to pull down a specific release --- Dockerfile | 14 +++++++++++--- readme.md | 2 +- templates/login.html | 4 ++-- 3 files changed, 14 insertions(+), 6 deletions(-) diff --git a/Dockerfile b/Dockerfile index 79f99b6..7b7c372 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,12 +1,20 @@ FROM tiangolo/meinheld-gunicorn-flask:python3.7 +ENV VERSION=1.0 +ENV TARBALL=v${VERSION}.tar.gz +ENV RELEASE=tomsmith-demo-python-${VERSION} + WORKDIR /tmp -RUN git clone git://github.com/castle/castle-demo-python +ADD https://github.com/castle/tomsmith-demo-python/archive/${TARBALL} ${TARBALL} + +RUN tar -xzf ${TARBALL} + +RUN rm ${TARBALL} -WORKDIR /tmp/castle-demo-python +RUN rm -r /app -RUN mv * /app +RUN mv ${RELEASE} /app WORKDIR /app diff --git a/readme.md b/readme.md index d98fece..8a31f4c 100644 --- a/readme.md +++ b/readme.md @@ -58,7 +58,7 @@ Run the app: `flask run` * Running on http://127.0.0.1:5000/ -Note - the app also support gunicorn: +Note - the app also supports gunicorn: `gunicorn app:app` diff --git a/templates/login.html b/templates/login.html index fa3af7e..e12e52a 100644 --- a/templates/login.html +++ b/templates/login.html @@ -55,9 +55,9 @@
- castle api endpoint: + castle api endpoint:
- event: + event: