From 597f36a846e100f05190910d3c6913b4527ab5ad Mon Sep 17 00:00:00 2001 From: Paul Schreiber Date: Fri, 2 Jun 2023 11:20:47 -0400 Subject: [PATCH] chore: break up Dockerfile into steps for better caching --- Dockerfile | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/Dockerfile b/Dockerfile index 01bee16b9..4ea54c3d2 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,19 +3,18 @@ FROM python:3.11.3-slim-bullseye RUN adduser --disabled-password terraso ENV PATH /home/terraso/.local/bin:$PATH -# see https://github.com/aws/aws-cli/tags for list of versions -ENV AWS_CLI_VERSION 2.8.12 -RUN apt-get update && \ - apt-get install -q -y --no-install-recommends \ +RUN apt-get update +RUN apt-get install -q -y --no-install-recommends \ build-essential libpq-dev dnsutils libmagic-dev mailcap \ gettext software-properties-common \ libgdal-dev gdal-bin unzip curl && \ - curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip" && \ - unzip awscliv2.zip && \ - ./aws/install && \ apt-get clean && rm -rf /var/lib/apt/lists/* +RUN curl -O "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" && \ + unzip awscli-exe-linux-x86_64.zip && \ + ./aws/install + WORKDIR /app COPY --chown=terraso:terraso requirements.txt /app