From 71eed0426b1ba69f634b47598c5df09669738996 Mon Sep 17 00:00:00 2001 From: Chuck Cox Date: Mon, 27 Jan 2020 12:17:04 -0600 Subject: [PATCH 1/3] Revert "chore: remove dupe dependency file" --- Dockerfile | 4 +- Dockerfile-tools | 5 +- Pipfile | 18 +++--- Pipfile.lock | 160 ----------------------------------------------- README.md | 2 +- requirements.txt | 5 ++ 6 files changed, 19 insertions(+), 175 deletions(-) mode change 100644 => 100755 Pipfile delete mode 100644 Pipfile.lock create mode 100755 requirements.txt diff --git a/Dockerfile b/Dockerfile index 17f45fa..cf79a3d 100755 --- a/Dockerfile +++ b/Dockerfile @@ -2,7 +2,7 @@ FROM registry.access.redhat.com/ubi8/python-36 WORKDIR /app -COPY Pipfile* /app/ +COPY requirements.txt /tmp/requirements.txt ## NOTE - rhel enforces user container permissions stronger ## USER root @@ -10,7 +10,7 @@ RUN yum install python3-pip wget RUN pip install --upgrade pip \ && pip install --upgrade pipenv\ - && pipenv install --system --deploy --ignore-pipfile + && pip install --upgrade -r /tmp/requirements.txt USER 1001 diff --git a/Dockerfile-tools b/Dockerfile-tools index 3f1c68a..de28765 100755 --- a/Dockerfile-tools +++ b/Dockerfile-tools @@ -3,7 +3,7 @@ FROM registry.access.redhat.com/ubi8/ubi WORKDIR /app -COPY Pipfile* /app/ +COPY requirements.txt /tmp/requirements.txt # Install python3 RUN yum -y install --disableplugin=subscription-manager python36 \ @@ -12,8 +12,7 @@ RUN yum -y install --disableplugin=subscription-manager python36 \ RUN yum -y install --disableplugin=subscription-manager python3-pip wget \ && yum --disableplugin=subscription-manager clean all -RUN pip3 install pipenv -RUN pipenv install --system --deploy --ignore-pipfile +RUN pip3 install --upgrade -r /tmp/requirements.txt # Update python command to point to python3 install RUN alternatives --set python /usr/bin/python3 diff --git a/Pipfile b/Pipfile old mode 100644 new mode 100755 index 6ad6a79..f132b7a --- a/Pipfile +++ b/Pipfile @@ -1,16 +1,16 @@ [[source]] -name = "pypi" -url = "https://pypi.org/simple" + +url = "https://pypi.python.org/simple" verify_ssl = true +name = "pypi" + [dev-packages] + [packages] +livereload ='*' +ibmcloudenv ='~=0.0' +flask = ">=1.0.0" gunicorn = "==19.7.1" -ibmcloudenv = "*" -livereload = "*" -Flask = ">=1.0.0" -prometheus_client = "*" - -[requires] -python_version = ">=3" +prometheus-client = "*" diff --git a/Pipfile.lock b/Pipfile.lock deleted file mode 100644 index 702ef99..0000000 --- a/Pipfile.lock +++ /dev/null @@ -1,160 +0,0 @@ -{ - "_meta": { - "hash": { - "sha256": "c049ba114bc84932cbe4759fd692ac78c6a60b44b5c83f559d75bba9864bae29" - }, - "pipfile-spec": 6, - "requires": { - "python_version": ">=3" - }, - "sources": [ - { - "name": "pypi", - "url": "https://pypi.org/simple", - "verify_ssl": true - } - ] - }, - "default": { - "click": { - "hashes": [ - "sha256:2335065e6395b9e67ca716de5f7526736bfa6ceead690adf616d925bdc622b13", - "sha256:5b94b49521f6456670fdb30cd82a4eca9412788a93fa6dd6df72c94d5a8ff2d7" - ], - "version": "==7.0" - }, - "decorator": { - "hashes": [ - "sha256:54c38050039232e1db4ad7375cfce6748d7b41c29e95a081c8a6d2c30364a2ce", - "sha256:5d19b92a3c8f7f101c8dd86afd86b0f061a8ce4540ab8cd401fa2542756bce6d" - ], - "version": "==4.4.1" - }, - "flask": { - "hashes": [ - "sha256:13f9f196f330c7c2c5d7a5cf91af894110ca0215ac051b5844701f2bfd934d52", - "sha256:45eb5a6fd193d6cf7e0cf5d8a5b31f83d5faae0293695626f539a823e93b13f6" - ], - "index": "pypi", - "version": "==1.1.1" - }, - "gunicorn": { - "hashes": [ - "sha256:75af03c99389535f218cc596c7de74df4763803f7b63eb09d77e92b3956b36c6", - "sha256:eee1169f0ca667be05db3351a0960765620dad53f53434262ff8901b68a1b622" - ], - "index": "pypi", - "version": "==19.7.1" - }, - "ibmcloudenv": { - "hashes": [ - "sha256:a8b453b0b8b886545b8af47f64f425eb88351acc0b714336936fd6171ec7560e", - "sha256:e008fe44c6c62cbfc632437a8877277786c901deb68f5f45e1fda8cb6be1bc4e" - ], - "index": "pypi", - "version": "==0.2.1" - }, - "itsdangerous": { - "hashes": [ - "sha256:321b033d07f2a4136d3ec762eac9f16a10ccd60f53c0c91af90217ace7ba1f19", - "sha256:b12271b2047cb23eeb98c8b5622e2e5c5e9abd9784a153e9d8ef9cb4dd09d749" - ], - "version": "==1.1.0" - }, - "jinja2": { - "hashes": [ - "sha256:74320bb91f31270f9551d46522e33af46a80c3d619f4a4bf42b3164d30b5911f", - "sha256:9fe95f19286cfefaa917656583d020be14e7859c6b0252588391e47db34527de" - ], - "version": "==2.10.3" - }, - "jsonpath-rw": { - "hashes": [ - "sha256:05c471281c45ae113f6103d1268ec7a4831a2e96aa80de45edc89b11fac4fbec" - ], - "version": "==1.4.0" - }, - "livereload": { - "hashes": [ - "sha256:78d55f2c268a8823ba499305dcac64e28ddeb9a92571e12d543cd304faf5817b", - "sha256:89254f78d7529d7ea0a3417d224c34287ebfe266b05e67e51facaf82c27f0f66" - ], - "index": "pypi", - "version": "==2.6.1" - }, - "markupsafe": { - "hashes": [ - "sha256:00bc623926325b26bb9605ae9eae8a215691f33cae5df11ca5424f06f2d1f473", - "sha256:09027a7803a62ca78792ad89403b1b7a73a01c8cb65909cd876f7fcebd79b161", - "sha256:09c4b7f37d6c648cb13f9230d847adf22f8171b1ccc4d5682398e77f40309235", - "sha256:1027c282dad077d0bae18be6794e6b6b8c91d58ed8a8d89a89d59693b9131db5", - "sha256:24982cc2533820871eba85ba648cd53d8623687ff11cbb805be4ff7b4c971aff", - "sha256:29872e92839765e546828bb7754a68c418d927cd064fd4708fab9fe9c8bb116b", - "sha256:43a55c2930bbc139570ac2452adf3d70cdbb3cfe5912c71cdce1c2c6bbd9c5d1", - "sha256:46c99d2de99945ec5cb54f23c8cd5689f6d7177305ebff350a58ce5f8de1669e", - "sha256:500d4957e52ddc3351cabf489e79c91c17f6e0899158447047588650b5e69183", - "sha256:535f6fc4d397c1563d08b88e485c3496cf5784e927af890fb3c3aac7f933ec66", - "sha256:62fe6c95e3ec8a7fad637b7f3d372c15ec1caa01ab47926cfdf7a75b40e0eac1", - "sha256:6dd73240d2af64df90aa7c4e7481e23825ea70af4b4922f8ede5b9e35f78a3b1", - "sha256:717ba8fe3ae9cc0006d7c451f0bb265ee07739daf76355d06366154ee68d221e", - "sha256:79855e1c5b8da654cf486b830bd42c06e8780cea587384cf6545b7d9ac013a0b", - "sha256:7c1699dfe0cf8ff607dbdcc1e9b9af1755371f92a68f706051cc8c37d447c905", - "sha256:88e5fcfb52ee7b911e8bb6d6aa2fd21fbecc674eadd44118a9cc3863f938e735", - "sha256:8defac2f2ccd6805ebf65f5eeb132adcf2ab57aa11fdf4c0dd5169a004710e7d", - "sha256:98c7086708b163d425c67c7a91bad6e466bb99d797aa64f965e9d25c12111a5e", - "sha256:9add70b36c5666a2ed02b43b335fe19002ee5235efd4b8a89bfcf9005bebac0d", - "sha256:9bf40443012702a1d2070043cb6291650a0841ece432556f784f004937f0f32c", - "sha256:ade5e387d2ad0d7ebf59146cc00c8044acbd863725f887353a10df825fc8ae21", - "sha256:b00c1de48212e4cc9603895652c5c410df699856a2853135b3967591e4beebc2", - "sha256:b1282f8c00509d99fef04d8ba936b156d419be841854fe901d8ae224c59f0be5", - "sha256:b2051432115498d3562c084a49bba65d97cf251f5a331c64a12ee7e04dacc51b", - "sha256:ba59edeaa2fc6114428f1637ffff42da1e311e29382d81b339c1817d37ec93c6", - "sha256:c8716a48d94b06bb3b2524c2b77e055fb313aeb4ea620c8dd03a105574ba704f", - "sha256:cd5df75523866410809ca100dc9681e301e3c27567cf498077e8551b6d20e42f", - "sha256:e249096428b3ae81b08327a63a485ad0878de3fb939049038579ac0ef61e17e7" - ], - "version": "==1.1.1" - }, - "ply": { - "hashes": [ - "sha256:00c7c1aaa88358b9c765b6d3000c6eec0ba42abca5351b095321aef446081da3", - "sha256:096f9b8350b65ebd2fd1346b12452efe5b9607f7482813ffca50c22722a807ce" - ], - "version": "==3.11" - }, - "prometheus-client": { - "hashes": [ - "sha256:71cd24a2b3eb335cb800c7159f423df1bd4dcd5171b234be15e3f31ec9f622da" - ], - "index": "pypi", - "version": "==0.7.1" - }, - "six": { - "hashes": [ - "sha256:236bdbdce46e6e6a3d61a337c0f8b763ca1e8717c03b369e87a7ec7ce1319c0a", - "sha256:8f3cd2e254d8f793e7f3d6d9df77b92252b52637291d0f0da013c76ea2724b6c" - ], - "version": "==1.14.0" - }, - "tornado": { - "hashes": [ - "sha256:349884248c36801afa19e342a77cc4458caca694b0eda633f5878e458a44cb2c", - "sha256:398e0d35e086ba38a0427c3b37f4337327231942e731edaa6e9fd1865bbd6f60", - "sha256:4e73ef678b1a859f0cb29e1d895526a20ea64b5ffd510a2307b5998c7df24281", - "sha256:559bce3d31484b665259f50cd94c5c28b961b09315ccd838f284687245f416e5", - "sha256:abbe53a39734ef4aba061fca54e30c6b4639d3e1f59653f0da37a0003de148c7", - "sha256:c845db36ba616912074c5b1ee897f8e0124df269468f25e4fe21fe72f6edd7a9", - "sha256:c9399267c926a4e7c418baa5cbe91c7d1cf362d505a1ef898fde44a07c9dd8a5" - ], - "version": "==6.0.3" - }, - "werkzeug": { - "hashes": [ - "sha256:7280924747b5733b246fe23972186c6b348f9ae29724135a6dfc1e53cea433e7", - "sha256:e5f4a1f98b52b18a93da705a7458e55afb26f32bff83ff5d19189f92462d65c4" - ], - "version": "==0.16.0" - } - }, - "develop": {} -} diff --git a/README.md b/README.md index 2bc57a0..0aef189 100644 --- a/README.md +++ b/README.md @@ -52,7 +52,7 @@ To get started building this application locally, you can either run the applica Running Flask applications has been simplified with a `manage.py` file to avoid dealing with configuring environment variables to run your app. From your project root, you can download the project dependencies with: ```bash -pipenv install --system --deploy --ignore-pipfile +pip install -r requirements.txt ``` To run your application locally: diff --git a/requirements.txt b/requirements.txt new file mode 100755 index 0000000..74f8b13 --- /dev/null +++ b/requirements.txt @@ -0,0 +1,5 @@ +Flask>=1.0.0 +gunicorn==19.7.1 +prometheus-client +ibmcloudenv +livereload From 5e5871995f5308b8c22a1cf08be4b948ea4d564f Mon Sep 17 00:00:00 2001 From: Nick Steinhauser Date: Tue, 28 Jan 2020 15:31:37 -0600 Subject: [PATCH 2/3] hotfix: remove 'HEAD' --- Dockerfile | 4 ---- Dockerfile-tools | 4 ---- Pipfile | 4 ---- README.md | 4 ---- 4 files changed, 16 deletions(-) diff --git a/Dockerfile b/Dockerfile index 60e6824..9ccf4f2 100755 --- a/Dockerfile +++ b/Dockerfile @@ -10,11 +10,7 @@ RUN yum install python3-pip wget RUN pip install --upgrade pip \ && pip install --upgrade pipenv\ -<<<<<<< HEAD - && pip install --upgrade -r /tmp/requirements.txt -======= && pipenv install --system --deploy ->>>>>>> stage1 USER 1001 diff --git a/Dockerfile-tools b/Dockerfile-tools index b5b23ff..a3fb728 100755 --- a/Dockerfile-tools +++ b/Dockerfile-tools @@ -12,12 +12,8 @@ RUN yum -y install --disableplugin=subscription-manager python36 \ RUN yum -y install --disableplugin=subscription-manager python3-pip wget \ && yum --disableplugin=subscription-manager clean all -<<<<<<< HEAD -RUN pip3 install --upgrade -r /tmp/requirements.txt -======= RUN pip3 install pipenv RUN pipenv install ->>>>>>> stage1 # Update python command to point to python3 install RUN alternatives --set python /usr/bin/python3 diff --git a/Pipfile b/Pipfile index 913b03e..fabfc85 100755 --- a/Pipfile +++ b/Pipfile @@ -13,11 +13,7 @@ livereload ='*' ibmcloudenv ='~=0.0' flask = ">=1.0.0" gunicorn = "==19.7.1" -<<<<<<< HEAD -prometheus-client = "*" -======= ibmcloudenv = "*" livereload = "*" Flask = ">=1.0.0" prometheus_client = "*" ->>>>>>> stage1 diff --git a/README.md b/README.md index 35b2af4..a3fd4db 100644 --- a/README.md +++ b/README.md @@ -52,11 +52,7 @@ To get started building this application locally, you can either run the applica Running Flask applications has been simplified with a `manage.py` file to avoid dealing with configuring environment variables to run your app. From your project root, you can download the project dependencies with (NOTE: If you don't have pipenv installed, execute: `pip install pipenv`): ```bash -<<<<<<< HEAD -pip install -r requirements.txt -======= pipenv install ->>>>>>> stage1 ``` To run your application locally: From d93690029b0f1f0fb611ed57826bc61171ad19e8 Mon Sep 17 00:00:00 2001 From: Chuck Cox Date: Wed, 29 Jan 2020 15:27:18 -0600 Subject: [PATCH 3/3] chore: remove dupe dependency file again --- Dockerfile | 2 +- Dockerfile-tools | 2 +- Pipfile | 10 ++-------- requirements.txt | 5 ----- 4 files changed, 4 insertions(+), 15 deletions(-) mode change 100755 => 100644 Pipfile delete mode 100755 requirements.txt diff --git a/Dockerfile b/Dockerfile index 9ccf4f2..766ab5d 100755 --- a/Dockerfile +++ b/Dockerfile @@ -2,7 +2,7 @@ FROM registry.access.redhat.com/ubi8/python-36 WORKDIR /app -COPY requirements.txt /tmp/requirements.txt +COPY Pipfile* /app/ ## NOTE - rhel enforces user container permissions stronger ## USER root diff --git a/Dockerfile-tools b/Dockerfile-tools index a3fb728..7369c89 100755 --- a/Dockerfile-tools +++ b/Dockerfile-tools @@ -3,7 +3,7 @@ FROM registry.access.redhat.com/ubi8/ubi WORKDIR /app -COPY requirements.txt /tmp/requirements.txt +COPY Pipfile* /app/ # Install python3 RUN yum -y install --disableplugin=subscription-manager python36 \ diff --git a/Pipfile b/Pipfile old mode 100755 new mode 100644 index fabfc85..2f1f687 --- a/Pipfile +++ b/Pipfile @@ -1,17 +1,11 @@ [[source]] - -url = "https://pypi.python.org/simple" -verify_ssl = true name = "pypi" - +url = "https://pypi.org/simple" +verify_ssl = true [dev-packages] - [packages] -livereload ='*' -ibmcloudenv ='~=0.0' -flask = ">=1.0.0" gunicorn = "==19.7.1" ibmcloudenv = "*" livereload = "*" diff --git a/requirements.txt b/requirements.txt deleted file mode 100755 index 74f8b13..0000000 --- a/requirements.txt +++ /dev/null @@ -1,5 +0,0 @@ -Flask>=1.0.0 -gunicorn==19.7.1 -prometheus-client -ibmcloudenv -livereload