pip
DOK-DL3013pip install <package>
use pip install <package>==<version>
or pip install --requirement <requirements file>
12RUN apt-get install -y net-tools
13RUN apt-get install -y cpio
14RUN pip3 install --upgrade pip
15RUN pip3 install pyresttest16
17COPY . $WDIR/
18
pip install <package>
use pip install <package>==<version>
or pip install --requirement <requirements file>
11RUN apt-get install -y python3-pip
12RUN apt-get install -y net-tools
13RUN apt-get install -y cpio
14RUN pip3 install --upgrade pip15RUN pip3 install pyresttest
16
17COPY . $WDIR/
pip install <package>
use pip install <package>==<version>
or pip install --requirement <requirements file>
71
72
73# This updates the distro-provided pip and gives us pip3.6 binary
74RUN python3.7 -m pip install --upgrade pip pipenv75
76WORKDIR ${APP_ROOT}
77
pip install <package>
use pip install <package>==<version>
or pip install --requirement <requirements file>
25 tk-dev \
26 xz-dev \
27 zlib-dev
28RUN pip install uvloop29RUN apk del .build-deps
30COPY udpserver.py /app/udpserver.py
31EXPOSE 8125/udp
pip install <package>
use pip install <package>==<version>
or pip install --requirement <requirements file>
80 mkdir -p /var/www/.cache && \
81 chown www-data:www-data /var/www/.cache
82
83RUN \ 84 python3.6 -m pip install --upgrade pip && \
85 python3.6 -m pip install pipenv
86
Version pinning forces the build to retrieve a particular version regardless of what’s in the cache. This technique can also reduce failures due to unanticipated changes in required packages. You can read more about version pinning here.
FROM python:3.4
RUN pip install django
RUN pip install https://github.com/Banno/carbon/tarball/0.9.x-fix-events-callback
FROM python:3.4
RUN pip install django==1.9
RUN pip install git+https://github.com/Banno/[email protected]
You can also specify the requirements in a text file and pass it to pip as shown here.