1# Copyright 2020 Google LLC 2# 3# Licensed under the Apache License, Version 2.0 (the "License"); 4# you may not use this file except in compliance with the License. 5# You may obtain a copy of the License at 6# 7# http://www.apache.org/licenses/LICENSE-2.0 8# 9# Unless required by applicable law or agreed to in writing, software 10# distributed under the License is distributed on an "AS IS" BASIS, 11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12# See the License for the specific language governing permissions and 13# limitations under the License. 14 15from ubuntu:20.04 16 17ENV DEBIAN_FRONTEND noninteractive 18 19# Ensure local Python is preferred over distribution Python. 20ENV PATH /usr/local/bin:$PATH 21 22# Install dependencies. 23RUN apt-get update \ 24 && apt-get install -y --no-install-recommends \ 25 apt-transport-https \ 26 build-essential \ 27 ca-certificates \ 28 curl \ 29 dirmngr \ 30 git \ 31 gpg-agent \ 32 graphviz \ 33 libbz2-dev \ 34 libdb5.3-dev \ 35 libexpat1-dev \ 36 libffi-dev \ 37 liblzma-dev \ 38 libreadline-dev \ 39 libsnappy-dev \ 40 libssl-dev \ 41 libsqlite3-dev \ 42 portaudio19-dev \ 43 python3-distutils \ 44 redis-server \ 45 software-properties-common \ 46 ssh \ 47 sudo \ 48 tcl \ 49 tcl-dev \ 50 tk \ 51 tk-dev \ 52 uuid-dev \ 53 wget \ 54 zlib1g-dev \ 55 && add-apt-repository universe \ 56 && apt-get update \ 57 && apt-get -y install jq \ 58 && apt-get clean autoclean \ 59 && apt-get autoremove -y \ 60 && rm -rf /var/lib/apt/lists/* \ 61 && rm -f /var/cache/apt/archives/*.deb 62 63RUN wget -O /tmp/get-pip.py 'https://bootstrap.pypa.io/get-pip.py' \ 64 && python3.8 /tmp/get-pip.py \ 65 && rm /tmp/get-pip.py 66 67CMD ["python3.8"] 68