From 90b76c8bae0ee488d1c9b3e040db47b3410a5c42 Mon Sep 17 00:00:00 2001 From: "Hughes, Alexander (ah8742)" Date: Wed, 29 May 2019 08:21:52 -0500 Subject: [PATCH] Update Spyglass base image to ubuntu:16.04 Per community discussion updating default image to ubuntu:16.04 in place of python:3.6 for two reasons: 1. Reduce number of vulnerabilities in the built image 2. Standardize across Airship the default image used as ubuntu:16.04 Change-Id: I598989ae15a86520850dbf6693feab659a135fff --- images/spyglass/Dockerfile | 29 +++++++++++++++++++++++++++-- 1 file changed, 27 insertions(+), 2 deletions(-) diff --git a/images/spyglass/Dockerfile b/images/spyglass/Dockerfile index f4da581..de3464c 100644 --- a/images/spyglass/Dockerfile +++ b/images/spyglass/Dockerfile @@ -1,4 +1,4 @@ -ARG FROM=python:3.6 +ARG FROM=ubuntu:16.04 FROM ${FROM} LABEL org.opencontainers.image.authors='airship-discuss@lists.airshipit.org, irc://#airshipit@freenode' @@ -8,10 +8,35 @@ LABEL org.opencontainers.image.source='https://opendev.org/airship/spyglass' LABEL org.opencontainers.image.vendor='The Airship Authors' LABEL org.opencontainers.image.licenses='Apache-2.0' +ENV LANG=C.UTF-8 +ENV LC_ALL=C.UTF-8 + +RUN set -ex \ + && apt-get update -qq \ + && apt-get install -y --no-install-recommends \ + ca-certificates \ + curl \ + gcc \ + git \ + libssl-dev \ + netbase \ + python3-dev \ + python3-pip \ + python3-setuptools \ + && python3 -m pip install -U pip \ + && apt-get autoremove -yqq --purge \ + && apt-get clean \ + && rm -rf \ + /tmp/* \ + /usr/share/doc \ + /usr/share/doc-base \ + /usr/share/man \ + /var/lib/apt/lists/* \ + /var/tmp/* + VOLUME /var/spyglass WORKDIR /var/spyglass - COPY requirements.txt /opt/spyglass/requirements.txt RUN pip3 install --no-cache-dir -r /opt/spyglass/requirements.txt