apt get install
DOK-DL3008apt-get install <package>
use apt-get install <package>=<version>
54ENV DEBIAN_FRONTEND noninteractive
55ENV DEBCONF_NOWARNINGS="yes"
56
57RUN apt-get update \58 && apt-get install -yq --no-install-recommends build-essential curl \
59 && rm -rf /var/lib/apt/lists/* /usr/share/doc /usr/share/man \
60 && apt-get clean \
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 between versions of dependencies.
You can read more about version pinning here
FROM debian:buster
RUN apt-get install python
FROM debian:buster
RUN apt-get install python=2.7