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

pip failing to run git in docker #465

Closed
mkaushik17 opened this issue May 4, 2020 · 5 comments · Fixed by jantman/versionfinder#13
Closed

pip failing to run git in docker #465

mkaushik17 opened this issue May 4, 2020 · 5 comments · Fixed by jantman/versionfinder#13

Comments

@mkaushik17
Copy link

facing this error after creating the docker image.
not able to run docker successfully

Installation Method

Getting error when doing the docker run -e "*"
e.g. sudo docker run -e AWS_DEFAULT_REGION=$AWS_DEFAULT_REGION jantman/awslimitchecker --version
gives the following error

Error: CRITICAL:pip.subprocessor:Error [Errno 2] No such file or directory: 'git' while executing command git config --get-regexp 'remote..*.url'

Installation done on docker with the docker image provided
fresh installation done over an Ubuntu 18.04
docker version 19.03.8

@jantman
Copy link
Owner

jantman commented May 4, 2020

@mkaushik17 Can you please fill in each field of the issue template? Most especially, the EXACT command that you're running (with any sensitive values changed to a placeholder string such as ""), and the image tag that you're using? If the --version entrypoint does not work could you please post the digest of the image you're using, which can be found with docker inspect --format='{{.RepoDigests}}' jantman/awslimitchecker

Bug Report

When reporting a bug in awslimitchecker, please provide all of the following information,
as well as any additional details that may be useful in reproducing or fixing
the issue:

Version

awslimitchecker version, as reported by awslimitchecker --version

Installation Method

How was awslimitchecker installed (provide as much detail as possible, ideally
the exact command used and whether it was installed in a virtualenv or not).

Supporting Software Versions

The output of python --version and virtualenv --version in the environment
that awslimitchecker is running in, as well as your operating system type and version.

Actual Output

Paste here the output of awslimitchecker (including the command used to run it),
run with the -vv (debug-level output) flag, that shows the issue.

Expected Output

Describe the output that you expected (what's wrong). If possible, after your description,
copy the actual output above and modify it to what was expected.

TrustedAdvisor

If the bug/issue is related to TrustedAdvisor, which support contract your account has.

Testing Assistance

Indicate whether or not you will be able to assist in testing pre-release
code for the feature.

@tmo-trustpilot
Copy link

I'm seeing the same error from the latest image from dockerhub, but it seems like running the checks actually works fine. I thought it was broken for a while too when I was running --region to check my credentials were passed through correctly.

Version

$ docker run jantman/awslimitchecker --version --region us-east-1
CRITICAL:pip.subprocessor:Error [Errno 2] No such file or directory: 'git' while executing command git config --get-regexp 'remote\..*\.url'
awslimitchecker 8.0.2 is AGPL-licensed free software; all users have a right to the full source code of this version. See <https://github.com/jantman/awslimitchecker>
awslimitchecker 8.0.2 (see <https://github.com/jantman/awslimitchecker> for source code)
$ docker images jantman/awslimitchecker
REPOSITORY                TAG                 IMAGE ID            CREATED             SIZE
jantman/awslimitchecker   latest              1fa15f073655        3 months ago        181MB

Installation Method

$ docker pull jantman/awslimitchecker
Using default tag: latest
latest: Pulling from jantman/awslimitchecker
Digest: sha256:c801f06d7a279be187524fe706c9489d02bddc8d0e446299fc07446ccb342de0
Status: Image is up to date for jantman/awslimitchecker:latest
docker.io/jantman/awslimitchecker:latest

Supporting Software Versions

$ docker --version
Docker version 19.03.8, build afacb8b

Actual output

Running this also produces that error but then does go on to give some real data

docker run \
    -v "$HOME/.aws/credentials":/root/.aws/credentials \
    jantman/awslimitchecker --region us-east-1 

@jantman
Copy link
Owner

jantman commented Jun 22, 2020

@tmo-trustpilot Thanks for the details. I'll do my best to dig into this within the next few days.

@varuzam
Copy link

varuzam commented Aug 26, 2020

I got into the same problem.

docker run --rm -ti --entrypoint /bin/sh -v ~/.aws:/root/.aws jantman/awslimitchecker:8.0.2
/ # awslimitchecker -r us-west-2 -S VPC --skip-ta
CRITICAL:pip.subprocessor:Error [Errno 2] No such file or directory: 'git' while executing command git config --get-regexp 'remote\..*\.url'
awslimitchecker 8.0.2 is AGPL-licensed free software; all users have a right to the full source code of this version. See <https://github.com/jantman/awslimitchecker>
VPC/VPCs  (limit 5.0) WARNING: 4

/ # echo $?
1

how to avoid the error?

@jantman
Copy link
Owner

jantman commented Sep 18, 2020

The fix for this has been released in 8.1.0 which is now live on PyPI and live on Docker Hub.

Thank you so much!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants