From e8eba9931cfa3f2c3417bfbd5f9da84bef66000b Mon Sep 17 00:00:00 2001 From: Joakim Uddholm Date: Tue, 29 May 2018 17:57:12 +0200 Subject: [PATCH] Install git in dockerfile for git dependencies. In my Pipfile I have the following package, while I'm waiting on the package authors' pypi release of a PR I made. ``` python-nomad = {git = "https://github.com/jrxFive/python-nomad"} ``` However when building my docker image I get the following: ``` Error [Errno 2] No such file or directory: 'git': 'git' while executing command git clone -q https://github.com/jrxFive/python-nomad /tmp/pip-build-yl5dapck/python-nomad Cannot find command 'git' ``` I tried with the following Dockerfile ```Dockerfile FROM kennethreitz/pipenv RUN apt-get update & apt-get install git COPY . /app CMD [ "./start_worker.sh" ] ``` Apparently the `ONBUILD` commands in the parent pipenv image run before I get to install via apt. --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index ccf35a6c..b5f681b1 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,7 @@ FROM ubuntu:18.04 # -- Install Pipenv: -RUN apt update && apt install python3-pip -y && pip3 install pipenv +RUN apt update && apt install python3-pip git -y && pip3 install pipenv ENV LC_ALL C.UTF-8 ENV LANG C.UTF-8