From f78c86a40b8de4bd89094536591e40f6b6f83ac1 Mon Sep 17 00:00:00 2001 From: Paul Sanders Date: Thu, 23 Jun 2022 16:18:25 -0400 Subject: [PATCH 1/2] Reduce docker image size --- Dockerfile | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/Dockerfile b/Dockerfile index ada995645..a16165f7d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -13,7 +13,7 @@ ARG SKIP_MSSQL_INSTALLATION # Install auxiliary software RUN apt-get update && \ - apt-get install -y \ + apt-get install -y --no-install-recommends \ git \ make \ ipython \ @@ -21,22 +21,26 @@ RUN apt-get update && \ curl \ g++ \ gnupg \ - gcc + gcc \ + && apt-get clean \ + && rm -rf /var/lib/apt/lists/* RUN echo "ENVIRONMENT VAR: SKIP_MSSQL_INSTALLATION $SKIP_MSSQL_INSTALLATION" # SQL Server (MS SQL) # https://docs.microsoft.com/en-us/sql/connect/odbc/linux-mac/installing-the-microsoft-odbc-driver-for-sql-server?view=sql-server-ver15 -RUN if [ "$SKIP_MSSQL_INSTALLATION" != "true" ] ; then apt-get install apt-transport-https ; fi +RUN if [ "$SKIP_MSSQL_INSTALLATION" != "true" ] ; then apt-get install -y --no-install-recommends apt-transport-https && apt-get clean && rm -rf /var/lib/apt/lists/* ; fi RUN if [ "$SKIP_MSSQL_INSTALLATION" != "true" ] ; then curl https://packages.microsoft.com/keys/microsoft.asc | apt-key add - ; fi RUN if [ "$SKIP_MSSQL_INSTALLATION" != "true" ] ; then curl https://packages.microsoft.com/config/debian/10/prod.list | tee /etc/apt/sources.list.d/msprod.list ; fi RUN if [ "$SKIP_MSSQL_INSTALLATION" != "true" ] ; then apt-get update ; fi ENV ACCEPT_EULA=y DEBIAN_FRONTEND=noninteractive -RUN if [ "$SKIP_MSSQL_INSTALLATION" != "true" ] ; then apt-get -y install \ +RUN if [ "$SKIP_MSSQL_INSTALLATION" != "true" ] ; then apt-get -y --no-install-recommends install \ unixodbc-dev \ msodbcsql17 \ - mssql-tools ; fi + mssql-tools \ + && apt-get clean \ + && rm -rf /var/lib/apt/lists/* ; fi # Update pip and install requirements COPY requirements.txt dev-requirements.txt mssql-requirements.txt ./ From a40cfd0f55f316874d8625fe3ee444a2891b0369 Mon Sep 17 00:00:00 2001 From: Paul Sanders Date: Thu, 23 Jun 2022 17:09:08 -0400 Subject: [PATCH 2/2] Update CHANGELOG --- CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4bcfeb393..87da58148 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -19,6 +19,9 @@ The types of changes are: ## [Unreleased](https://github.com/ethyca/fidesops/compare/1.6.0...main) +### Devloper Experience +* Reduce the size of the docker image [#707](https://github.com/ethyca/fidesops/pull/707) + ## [1.6.0](https://github.com/ethyca/fidesops/compare/1.5.3...1.6.0)