Skip to content

Commit

Permalink
[docker-base-buster]: Install python 3.7 into docker-base-buster (#4603)
Browse files Browse the repository at this point in the history
* Install python3 in docker-base-buster, so all derived image will benefit

Signed-off-by: Qi Luo <qiluo-msft@users.noreply.github.com>
  • Loading branch information
qiluo-msft committed May 17, 2020
1 parent 9814da1 commit af95d57
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 19 deletions.
2 changes: 2 additions & 0 deletions dockers/docker-base-buster/Dockerfile.j2
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ RUN apt-get update && \
procps \
python \
python-pip \
python3 \
python3-pip \
rsyslog \
vim-tiny \
# Install dependencies of supervisor
Expand Down
23 changes: 4 additions & 19 deletions dockers/docker-snmp-sv2/Dockerfile.j2
Original file line number Diff line number Diff line change
Expand Up @@ -11,20 +11,12 @@ ENV PYTHONOPTIMIZE 1
ENV DEBIAN_FRONTEND=noninteractive

# Update apt's cache of available packages
# Install curl so we can download and install pip later
# Also install major root CA certificates for curl to reference
# Install gcc which is required for installing hiredis
# Install libdpkg-perl which is required for python3.6-3.6.0 as one of its specs i.e. no-pie-compile.specs
# The file referenced (`/usr/share/dpkg/no-pie-compile.specs`) is in the `libdpkg-perl` package on Debian
# Install make/gcc which is required for installing hiredis
RUN apt-get update && \
apt-get install -y \
python3 \
python3-pip \
python3-dev \
ca-certificates \
gcc \
make \
libdpkg-perl \
ipmitool

{% if docker_snmp_sv2_debs.strip() -%}
Expand All @@ -36,7 +28,7 @@ RUN apt-get update && \
{%- endif %}

# Fix for hiredis compilation issues for ARM
# python will throw for missing locale
# python will throw for missing locale
RUN apt-get install -y locales
RUN locale-gen "en_US.UTF-8"
RUN dpkg-reconfigure --frontend noninteractive locales
Expand Down Expand Up @@ -66,16 +58,9 @@ RUN python3 -m sonic_ax_impl install

# Clean up
RUN apt-get -y purge \
python3-dev \
curl \
python3-dev \
gcc \
make \
libdpkg-perl \
# Note: these packages should be removed with autoremove but actually not, so explicitly purged
libldap-2.4-2 \
libsasl2-2 \
libsasl2-modules \
libsasl2-modules-db && \
make && \
apt-get clean -y && \
apt-get autoclean -y && \
apt-get autoremove -y --purge && \
Expand Down

0 comments on commit af95d57

Please sign in to comment.