Files
pipenv/Dockerfile
Joakim Uddholm e8eba9931c 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.
2018-05-29 17:57:12 +02:00

31 lines
606 B
Docker

FROM ubuntu:18.04
# -- 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
# -- Install Application into container:
RUN set -ex && mkdir /app
WORKDIR /app
# -- Adding Pipfiles
ONBUILD COPY Pipfile Pipfile
ONBUILD COPY Pipfile.lock Pipfile.lock
# -- Install dependencies:
ONBUILD RUN set -ex && pipenv install --deploy --system
# --------------------
# - Using This File: -
# --------------------
# FROM kennethreitz/pipenv
# COPY . /app
# -- Replace with the correct path to your app's main executable
# CMD python3 main.py