Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cache package file not working as expected #6

Closed
devopsmash opened this issue May 23, 2022 · 1 comment
Closed

Cache package file not working as expected #6

devopsmash opened this issue May 23, 2022 · 1 comment
Labels
bug Something isn't working

Comments

@devopsmash
Copy link

Run proxpi docker with PROXPI_CACHE_DIR environment variable

docker run --env PROXPI_CACHE_DIR=/var/cache/proxpi -p 8080:5000 epicwink/proxpi

output:

 * Serving Flask app "proxpi.server"
 * Environment: production
   WARNING: This is a development server. Do not use it in a production deployment.
   Use a production WSGI server instead.
 * Debug mode: off
2022-05-23 11:32:51,080 [    INFO] proxpi._cache: Listing packages in index 'https://pypi.org/simple/'
2022-05-23 11:32:51,086 [    INFO] werkzeug:  * Running on http://0.0.0.0:5000/ (Press CTRL+C to quit)

install package from the proxpi docker

pip install -i http://localhost:8080/index/ gunicorn

output:

Defaulting to user installation because normal site-packages is not writeable
Looking in indexes: http://localhost:8080/index/


Collecting gunicorn
  Downloading http://localhost:8080/index/gunicorn/gunicorn-20.1.0-py3-none-any.whl (79 kB)
     |████████████████████████████████| 79 kB 125.6 MB/s 
Requirement already satisfied: setuptools>=3.0 in /usr/lib/python3/dist-packages (from gunicorn) (45.2.0)
Installing collected packages: gunicorn
Successfully installed gunicorn-20.1.0
WARNING: You are using pip version 21.1.3; however, version 22.1.1 is available.
You should consider upgrading via the '/usr/bin/python3 -m pip install --upgrade pip' command.

docker exec

docker exec -it 3a671ff06250 sh
ls -lhtra /var/cache/

output:

total 0      
drwxr-xr-x    2 root     root           6 Jan 16  2020 apk
drwxr-xr-x    1 root     root          19 Feb 26  2020 ..
drwxr-xr-x    1 root     root          18 Feb 26  2020 .
drwxr-xr-x    1 root     root           6 Mar 21  2020 misc

I can't find the cache for the gunicorn package that I have just installed, any idea where is the package?
note: find / -iname *gunicorn* return nothing

@devopsmash devopsmash added the bug Something isn't working label May 23, 2022
@EpicWink
Copy link
Owner

EpicWink commented May 24, 2022

Ahh, simple issue, the latest Docker tag epicwink/proxpi:latest was using proxpi v0.1a3. I just needed to update it to the latest version v1.0.0 (which I've done now). Perhaps I should fix the CI for that

Run docker pull epicwink/proxpi and try again

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants