Skip to content

Openverse is a search engine for openly-licensed media. This monorepo includes all application code.

Add pip upgrade command, docker optimizations (#265)

Madison Swain-Bowden74ad9bd86374
diff --git a/docker/local_postgres/Dockerfile b/docker/local_postgres/Dockerfile
index b404fb6ab..b5183975a 100644
--- a/docker/local_postgres/Dockerfile
+++ b/docker/local_postgres/Dockerfile
@@ -1,5 +1,13 @@
FROM postgres:13.2
+
ARG PGCLI_VERSION=3.2.0
+
+# Container optimizations
+ARG DEBIAN_FRONTEND=noninteractive
+ENV PIPNOCACHEDIR=1
+ENV PYTHONUNBUFFERED=1
+ENV PIP_NO_COLOR=1
+
RUN apt-get update && apt-get -yqq upgrade && apt-get -yqq install \
python3-boto3 \
postgresql-plpython3-13 \
@@ -7,6 +15,7 @@ RUN apt-get update && apt-get -yqq upgrade && apt-get -yqq install \
libpq-dev \
&& apt-get autoremove -y \
&& rm -rf /var/lib/apt/lists/* \
+ && pip3 install -U pip \
&& pip3 install pgcli==${PGCLI_VERSION}
COPY *.sql /docker-entrypoint-initdb.d/