crazy-max/docker-fail2ban

pip binary is missing, trying to `apk add py3-pip` breaks

danielkza opened this issue · 1 comments

Behaviour

Steps to reproduce this issue

  1. docker run --it --rm crazy-max/fail2ban:latest /bin/sh.
    Try to run pip; not present.
  2. Do apk add --update-cache py3-pip in the container.
  3. Run pip:
...
ImportError: cannot import name 'InvalidSchemeCombination' from 'pip._internal.exceptions' (/usr/lib/python3.9/site-packages/pip/_internal/exceptions.py)

This happens because there is a leftover pip package in site-packages, but /usr/bin/pip gets deleted at some point.

Expected behaviour

Either pip is completely removed, or the pip binary should remain.

Actual behaviour

Pip is neither here nor there.

Configuration

  • Docker version (type docker --version) : irrelevant
  • Docker compose version if applicable (type docker-compose --version) : irrelevant
  • Platform (Debian 9, Ubuntu 18.04, ...) : irrelevant
  • System info (type uname -a) : irrelevant
  • Include all necessary configuration files : docker-compose.yml, .env, irrelevant

What's your use case? Dev tools are not intended to be included in this image. Is there a missing python package for this image you want to use through a fail2ban action?