Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: break up Dockerfile into steps for better caching #557

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 6 additions & 7 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down