SimplyStaking / panic_cosmos

🚨 PANIC for Cosmos
GNU General Public License v3.0
47 stars 36 forks source link

Can not install deps in docker container #57

Closed wirwolf closed 3 years ago

wirwolf commented 3 years ago

I try to install this project in docker and i hame some problem with install deps

Dockerfile is

FROM python:3.5.2-alpine

WORKDIR /src

RUN apk add --no-cache  git

RUN git clone https://github.com/SimplyVC/panic_cosmos.git /src && git checkout $MONITORING_TAG

RUN pip install pipenv
RUN apk add --no-cache build-base libffi-dev
RUN mkdir -p /root/.local/share/virtualenv/wheel/3.5/embed/1
RUN pipenv sync

MONITORING_TAG=v1.1.2

and in log file, i see an error in last step

Installing dependencies from Pipfile.lock (bcf234)...
An error occurred while installing configparser==5.0.0 --hash=sha256:cffc044844040c7ce04e9acd1838b5f2e5fa3170182f6fda4d2ea8b0099dbadd --hash=sha256:2ca44140ee259b5e3d8aaf47c79c36a7ab0d5e94d70bd4105c03ede7a20ea5a1! Will try again.
An error occurred while installing cryptography==3.0; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4' --hash=sha256:384d7c681b1ab904fff3400a6909261cae1d0939cc483a68bdedab282fb89a07 --hash=sha256:8713ddb888119b0d2a1462357d5946b8911be01ddbf31451e1d07eaa5077a261 --hash=sha256:124af7255ffc8e964d9ff26971b3a6153e1a8a220b9a685dc407976ecb27a06a --hash=sha256:8ecef21ac982aa78309bb6f092d1677812927e8b5ef204a10c326fc29f1367e2 --hash=sha256:8ecf9400d0893836ff41b6f977a33972145a855b6efeb605b49ee273c5e6469f --hash=sha256:8e924dbc025206e97756e8903039662aa58aa9ba357d8e1d8fc29e3092322053 --hash=sha256:ce82cc06588e5cbc2a7df3c8a9c778f2cb722f56835a23a68b5a7264726bb00c --hash=sha256:45741f5499150593178fc98d2c1a9c6722df88b99c821ad6ae298eff0ba1ae71 --hash=sha256:dea0ba7fe6f9461d244679efa968d215ea1f989b9c1957d7f10c21e5c7c09ad6 --hash=sha256:4d355f2aee4a29063c10164b032d9fa8a82e2c30768737a2fd56d256146ad559 --hash=sha256:0cbfed8ea74631fe4de00630f4bb592dad564d57f73150d6f6796a24e76c76cd --hash=sha256:9367d00e14dee8d02134c6c9524bb4bd39d4c162456343d07191e2a0b5ec8b3b --hash=sha256:bec7568c6970b865f2bcebbe84d547c52bb2abadf74cefce396ba07571109c67 --hash=sha256:0c608ff4d4adad9e39b5057de43657515c7da1ccb1807c3a27d4cf31fc923b4b --hash=sha256:51e40123083d2f946794f9fe4adeeee2922b581fa3602128ce85ff813d85b81f --hash=sha256:bea0b0468f89cdea625bb3f692cd7a4222d80a6bdafd6fb923963f2b9da0e15f --hash=sha256:4b9303507254ccb1181d1803a2080a798910ba89b1a3c9f53639885c90f7a756 --hash=sha256:ab49edd5bea8d8b39a44b3db618e4783ef84c19c8b47286bf05dfdb3efb01c83 --hash=sha256:a09fd9c1cca9a46b6ad4bea0a1f86ab1de3c0c932364dbcf9a6c2a5eeb44fa77! Will try again.
Installing initially failed dependencies...
[InstallError]:   File "/usr/local/lib/python3.5/site-packages/pipenv/cli/command.py", line 696, in sync
[InstallError]:       system=state.system
[InstallError]:   File "/usr/local/lib/python3.5/site-packages/pipenv/core.py", line 2892, in do_sync
[InstallError]:       system=system,
[InstallError]:   File "/usr/local/lib/python3.5/site-packages/pipenv/core.py", line 1312, in do_init
[InstallError]:       pypi_mirror=pypi_mirror,
[InstallError]:   File "/usr/local/lib/python3.5/site-packages/pipenv/core.py", line 900, in do_install_dependencies
[InstallError]:       retry_list, procs, failed_deps_queue, requirements_dir, **install_kwargs
[InstallError]:   File "/usr/local/lib/python3.5/site-packages/pipenv/core.py", line 796, in batch_install
[InstallError]:       _cleanup_procs(procs, failed_deps_queue, retry=retry)
[InstallError]:   File "/usr/local/lib/python3.5/site-packages/pipenv/core.py", line 703, in _cleanup_procs
[InstallError]:       raise exceptions.InstallError(c.dep.name, extra=err_lines)
[pipenv.exceptions.InstallError]: DEPRECATION: Python 3.5 reached the end of its life on September 13th, 2020. Please upgrade your Python as Python 3.5 is no longer maintained. pip 21.0 will drop support for Python 3.5 in January 2021. pip 21.0 will remove support for this functionality.
[pipenv.exceptions.InstallError]: ERROR: Could not find a version that satisfies the requirement configparser==5.0.0
[pipenv.exceptions.InstallError]: ERROR: No matching distribution found for configparser==5.0.0
ERROR: Couldn't install package: configparser
 Package installation failed...
SimplyStaking commented 3 years ago

Add this DockerFile in the root of the repository and try it:

FROM python:3.7.5-slim-stretch

# Create app directory
WORKDIR /opt/panic_cosmos

# Copy everything from host into the container except the ignored files
COPY ./ ./

RUN pip install pipenv
RUN pipenv sync

CMD [ "pipenv", "run", "python", "run_alerter.py" ]

Or you can try and edit your script from FROM python:3.5.2-alpine to FROM python:3.7.5-slim-stretch