diff --git a/openfl-docker/Dockerfile.base b/openfl-docker/Dockerfile.base index f58d83747f..f6ae07860a 100644 --- a/openfl-docker/Dockerfile.base +++ b/openfl-docker/Dockerfile.base @@ -10,9 +10,10 @@ FROM ubuntu:22.04 AS base ENV DEBIAN_FRONTEND=noninteractive SHELL ["/bin/bash", "-o", "pipefail", "-c"] -# Install dependencies. +# Install dependencies and upgrade packages. RUN --mount=type=cache,id=apt-dev,target=/var/cache/apt \ apt-get update && \ + apt-get upgrade -y && \ apt-get install -y \ git \ curl \ @@ -24,7 +25,7 @@ RUN --mount=type=cache,id=apt-dev,target=/var/cache/apt \ --no-install-recommends && \ apt-get purge -y linux-libc-dev && \ rm -rf /var/lib/apt/lists/* - + # Create a python virtual environment. RUN python3.10 -m venv /opt/venv && \ /opt/venv/bin/pip install --no-cache-dir --upgrade pip setuptools wheel @@ -50,6 +51,8 @@ RUN pip install --no-cache-dir git+${OPENFL_REVISION} && \ # Create an unprivileged user. RUN groupadd -g 1001 default && \ useradd -m -u 1001 -g default user + +# Switch back to the non-root user USER user -CMD ["/bin/bash"] +CMD ["/bin/bash"] \ No newline at end of file