From bd9a187a54c89efca55f22d03707ccf4021c3e47 Mon Sep 17 00:00:00 2001 From: Daniel Casias Date: Wed, 11 Mar 2020 10:24:37 -0600 Subject: [PATCH 1/8] Use separate RUN commands for yum and pip --- Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index eb1d8c5..a4e2926 100755 --- a/Dockerfile +++ b/Dockerfile @@ -17,8 +17,8 @@ ENV CONFLUENCE_LB_PUBLIC_HOST=confluence-cluster \ # BASE PACKAGES # RUN yum install -y --nogpgcheck httpd python2-pip && \ - yum clean all && \ - pip2 install shinto-cli + yum clean all +RUN pip2 install shinto-cli # # ERROR LOG, USER -- GitLab From 52b10617164158257acc6f4fa06b32b13ff38604 Mon Sep 17 00:00:00 2001 From: Daniel Casias Date: Wed, 11 Mar 2020 18:11:09 -0600 Subject: [PATCH 2/8] Pull tarball and copy over --- Dockerfile | 6 ++++-- download.yaml | 6 ++++++ 2 files changed, 10 insertions(+), 2 deletions(-) create mode 100644 download.yaml diff --git a/Dockerfile b/Dockerfile index a4e2926..74339ed 100755 --- a/Dockerfile +++ b/Dockerfile @@ -16,9 +16,11 @@ ENV CONFLUENCE_LB_PUBLIC_HOST=confluence-cluster \ # # BASE PACKAGES # -RUN yum install -y --nogpgcheck httpd python2-pip && \ +ARG TARBALL=shinto-cli-0.5.0.tar.gz +COPY ${TARBALL} /tmp/${TARBALL} +RUN yum install -y --nogpgcheck httpd python3-pip && \ yum clean all -RUN pip2 install shinto-cli +RUN pip3 install bottle /tmp/${TARBALL}} # # ERROR LOG, USER diff --git a/download.yaml b/download.yaml new file mode 100644 index 0000000..b98356e --- /dev/null +++ b/download.yaml @@ -0,0 +1,6 @@ +resources: + - url: https://files.pythonhosted.org/packages/15/59/9f8f85a52e13dcabc69110f88eb7ed5733a631b26f10be586168ee57cba9/shinto-cli-0.5.0.tar.gz + filename: shinto-cli-0.5.0.tar.gz + validation: + type: sha256 + value: c142e75c34ecd8d04a6200b23464e084ad54ca598e358d70b958044e6b628c95 -- GitLab From f40fb160d067270fff9191d99efe4719d84e72cd Mon Sep 17 00:00:00 2001 From: Daniel Casias Date: Wed, 11 Mar 2020 18:14:22 -0600 Subject: [PATCH 3/8] fix syntax error from IDE --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 74339ed..f7d1c13 100755 --- a/Dockerfile +++ b/Dockerfile @@ -20,7 +20,7 @@ ARG TARBALL=shinto-cli-0.5.0.tar.gz COPY ${TARBALL} /tmp/${TARBALL} RUN yum install -y --nogpgcheck httpd python3-pip && \ yum clean all -RUN pip3 install bottle /tmp/${TARBALL}} +RUN pip3 install bottle /tmp/${TARBALL} # # ERROR LOG, USER -- GitLab From 5974793718958a64a60001909d33a114a7fee939 Mon Sep 17 00:00:00 2001 From: Daniel Casias Date: Wed, 11 Mar 2020 18:19:50 -0600 Subject: [PATCH 4/8] Remove tarball after install --- Dockerfile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index f7d1c13..950f38a 100755 --- a/Dockerfile +++ b/Dockerfile @@ -20,7 +20,9 @@ ARG TARBALL=shinto-cli-0.5.0.tar.gz COPY ${TARBALL} /tmp/${TARBALL} RUN yum install -y --nogpgcheck httpd python3-pip && \ yum clean all -RUN pip3 install bottle /tmp/${TARBALL} +RUN pip3 install /tmp/${TARBALL} + +RUN rm -f /tmp/${TARBALL} # # ERROR LOG, USER -- GitLab From 9ac43bc49fe5eb5794b3d77f77c27fe790dee942 Mon Sep 17 00:00:00 2001 From: Daniel Casias Date: Wed, 11 Mar 2020 18:36:32 -0600 Subject: [PATCH 5/8] Install Jinja2 also --- Dockerfile | 11 +++++++---- download.yaml | 5 +++++ 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index 950f38a..3132d3d 100755 --- a/Dockerfile +++ b/Dockerfile @@ -16,13 +16,16 @@ ENV CONFLUENCE_LB_PUBLIC_HOST=confluence-cluster \ # # BASE PACKAGES # -ARG TARBALL=shinto-cli-0.5.0.tar.gz -COPY ${TARBALL} /tmp/${TARBALL} +ARG SHINTO=shinto-cli-0.5.0.tar.gz +ARG JINJA=Jinja2-2.7.2.tar.gz +COPY ${SHINTO} /tmp/${SHINTO} +COPY ${JINJA} /tmp/${JINJA} RUN yum install -y --nogpgcheck httpd python3-pip && \ yum clean all -RUN pip3 install /tmp/${TARBALL} +RUN pip3 install /tmp/${JINJA} +RUN pip3 install /tmp/${SHINTO} -RUN rm -f /tmp/${TARBALL} +RUN rm -f /tmp/${SHINTO} /tmp/${JINJA} # # ERROR LOG, USER diff --git a/download.yaml b/download.yaml index b98356e..7e94890 100644 --- a/download.yaml +++ b/download.yaml @@ -4,3 +4,8 @@ resources: validation: type: sha256 value: c142e75c34ecd8d04a6200b23464e084ad54ca598e358d70b958044e6b628c95 + - url: https://files.pythonhosted.org/packages/23/94/ca42176bf7a252ce1f5d165953013573dffdbe4b5dac07f57146146ea432/Jinja2-2.7.2.tar.gz + filename: Jinja2-2.7.2.tar.gz + validation: + type: sha256 + value: 310a35fbccac3af13ebf927297f871ac656b9da1d248b1fe6765affa71b53235 -- GitLab From edff2a89648cb933d3f61482ffa2842bfef3c868 Mon Sep 17 00:00:00 2001 From: Daniel Casias Date: Wed, 11 Mar 2020 18:46:22 -0600 Subject: [PATCH 6/8] use Python 2 for shinto --- Dockerfile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 3132d3d..042d806 100755 --- a/Dockerfile +++ b/Dockerfile @@ -20,10 +20,10 @@ ARG SHINTO=shinto-cli-0.5.0.tar.gz ARG JINJA=Jinja2-2.7.2.tar.gz COPY ${SHINTO} /tmp/${SHINTO} COPY ${JINJA} /tmp/${JINJA} -RUN yum install -y --nogpgcheck httpd python3-pip && \ +RUN yum install -y --nogpgcheck httpd python2-pip && \ yum clean all -RUN pip3 install /tmp/${JINJA} -RUN pip3 install /tmp/${SHINTO} +RUN pip2 install /tmp/${JINJA} +RUN pip2 install /tmp/${SHINTO} RUN rm -f /tmp/${SHINTO} /tmp/${JINJA} -- GitLab From 1db7443a68ecad115c0a945deb3d06a45da86fa2 Mon Sep 17 00:00:00 2001 From: Daniel Casias Date: Wed, 11 Mar 2020 18:53:33 -0600 Subject: [PATCH 7/8] now try with only shinto --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 042d806..66f90bb 100755 --- a/Dockerfile +++ b/Dockerfile @@ -22,7 +22,7 @@ COPY ${SHINTO} /tmp/${SHINTO} COPY ${JINJA} /tmp/${JINJA} RUN yum install -y --nogpgcheck httpd python2-pip && \ yum clean all -RUN pip2 install /tmp/${JINJA} +# RUN pip2 install /tmp/${JINJA} RUN pip2 install /tmp/${SHINTO} RUN rm -f /tmp/${SHINTO} /tmp/${JINJA} -- GitLab From ebee9771c525d59605d9e2b3284e68c781d562e2 Mon Sep 17 00:00:00 2001 From: Daniel Casias Date: Wed, 11 Mar 2020 19:03:39 -0600 Subject: [PATCH 8/8] Install MarkupSafe as well --- Dockerfile | 13 +++++++++++-- download.yaml | 5 +++++ 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 66f90bb..9032fcb 100755 --- a/Dockerfile +++ b/Dockerfile @@ -15,14 +15,23 @@ ENV CONFLUENCE_LB_PUBLIC_HOST=confluence-cluster \ # # BASE PACKAGES -# +# shinto 0.5.0 +# Dependencies of Shinto CLI +# Jinja2 2.11.1 +# MarkupSafe 1.1.1 ARG SHINTO=shinto-cli-0.5.0.tar.gz ARG JINJA=Jinja2-2.7.2.tar.gz +ARG MARKUPSAFE=MarkupSafe-1.1.1.tar.gz + COPY ${SHINTO} /tmp/${SHINTO} COPY ${JINJA} /tmp/${JINJA} +COPY ${MARKUPSAFE} /tmp/${MARKUPSAFE} + RUN yum install -y --nogpgcheck httpd python2-pip && \ yum clean all -# RUN pip2 install /tmp/${JINJA} + +RUN pip2 install /tmp/${MARKUPSAFE} +RUN pip2 install /tmp/${JINJA} RUN pip2 install /tmp/${SHINTO} RUN rm -f /tmp/${SHINTO} /tmp/${JINJA} diff --git a/download.yaml b/download.yaml index 7e94890..b7384f9 100644 --- a/download.yaml +++ b/download.yaml @@ -9,3 +9,8 @@ resources: validation: type: sha256 value: 310a35fbccac3af13ebf927297f871ac656b9da1d248b1fe6765affa71b53235 + - url: https://files.pythonhosted.org/packages/b9/2e/64db92e53b86efccfaea71321f597fa2e1b2bd3853d8ce658568f7a13094/MarkupSafe-1.1.1.tar.gz + filename: MarkupSafe-1.1.1.tar.gz + validation: + type: sha256 + value: 29872e92839765e546828bb7754a68c418d927cd064fd4708fab9fe9c8bb116b \ No newline at end of file -- GitLab