Clean up apt cache in docker build (#2821)

* Dockerfile: reduce layer bloat

* Re-separate layers

---------

Co-authored-by: Reinier van der Leer <github@pwuts.nl>
This commit is contained in:
Jan 2023-06-07 03:14:47 +02:00 committed by GitHub
parent fdc6e12945
commit 463dc54733
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -6,11 +6,13 @@ FROM python:3.10-slim AS autogpt-base
# Install browsers
RUN apt-get update && apt-get install -y \
chromium-driver firefox-esr \
ca-certificates
chromium-driver firefox-esr ca-certificates \
&& apt-get clean && rm -rf /var/lib/apt/lists/*
# Install utilities
RUN apt-get install -y curl jq wget git
RUN apt-get update && apt-get install -y \
curl jq wget git \
&& apt-get clean && rm -rf /var/lib/apt/lists/*
# Set environment variables
ENV PIP_NO_CACHE_DIR=yes \