dnephin / dobi

A build automation tool for Docker applications
https://dnephin.github.io/dobi/
Apache License 2.0
311 stars 36 forks source link

Can't `dobi lint` on dobi itself #212

Closed wimax-grapl closed 3 years ago

wimax-grapl commented 4 years ago

Dockerfile.lint says:

FROM    golang:1.13-alpine

RUN     apk add -U python py-pip python-dev musl-dev gcc git bash

The bare 'python' package has been deprecated, now you want the explicit python2 or python3 / py3-pip.

In switching it to python3, I found the next issue with pre-commit:

Collecting pre-commit
[...]
Collecting distlib<1,>=0.3.1
  Downloading distlib-0.3.1-py2.py3-none-any.whl (335 kB)
Using legacy setup.py install for pyyaml, since package 'wheel' is not installed.
Installing collected packages: cfgv, identify, filelock, distlib, virtualenv, pyyaml, nodeenv, pre-commit
  Attempting uninstall: distlib
    Found existing installation: distlib 0.3.0
ERROR: Cannot uninstall 'distlib'. It is a distutils installed project and thus we cannot accurately determine which files belong to it which would lead to only a partial uninstall.

I 'fixed' this with a

RUN     pip install --ignore-installed pre-commit
dnephin commented 3 years ago

Thank you for reporting this problem! I used your fixes. I think --ignore-installed is fine in this case since it is in a container and we don't need to uninstall anything.